package com.wicket.okrframework.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.wicket.okrframework.base.service.*;
import com.wicket.okrframework.base.service.dto.req.*;
import com.wicket.okrframework.base.service.dto.req.DeptDto;
import com.wicket.okrframework.biz.service.dto.common.*;
import com.wicket.okrframework.biz.service.dto.req.*;
import com.wicket.okrframework.biz.service.dto.res.*;
import com.wicket.okrframework.biz.service.nb.NbPower;
import com.wicket.okrframework.common.annotations.BanAuto;
import com.wicket.okrframework.common.exception.BizException;
import com.wicket.okrframework.common.util.CommonFunctionHelper;
import com.wicket.okrframework.common.util.RedisUtil;
import com.wicket.okrframework.dal.po.mbg.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import com.wicket.okrframework.common.exception.Assert;
import com.wicket.okrframework.biz.service.BatchService;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrcomponent.integration.FwCompInterfaceModeClient;
import com.wicket.okrcomponent.integration.dto.ImplementDataSetDuplicateRemovalComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementDataSetDuplicateRemovalComReqDto;
import com.wicket.okrcomponent.integration.dto.ImplementUnionMultipleDataSetsComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementUnionMultipleDataSetsComReqDto;
import com.wicket.okrcomponent.integration.dto.DataSetsListOneDto;
import com.wicket.okrcomponent.integration.dto.DataSetsListTwoDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class PowerServiceImpl
        implements com.wicket.okrframework.biz.service.PowerService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    private MManagedDeptService mManagedDeptService;
    @Resource
    private MDeptService mDeptService;
    @Resource
    private MOrganizationService mOrganizationService;
    @Resource
    private MPrivacyDistributionService mPrivacyDistributionService;
    @Resource
    private MPlatformAuthorizeService mPlatformAuthorizeService;
    @Resource
    private MSceneRoleService mSceneRoleService;
    @Resource
    private NbPower nbPower;
    @Resource
    private MPrivacyService mPrivacyService;
    @Resource
    private MRoleMemberService mRoleMemberService;
    @Resource
    private MInductionRecordService mInductionRecordService;
    @Resource
    private MUserinfoService mUserinfoService;
    @Resource
    private MDeptPositionRelationshipService mDeptPositionRelationshipService;
    @Resource
    private MPositionService mPositionService;
    @Resource
    private MPositionGradeService mPositionGradeService;
    @Resource
    private MOriginalRoleMemberService mOriginalRoleMemberService;
    @Resource
    private MOriginalRoleMemberInfoService mOriginalRoleMemberInfoService;
//@Resource
 //private MCustomFields2Service mCustomFields2Service;
@Resource
  private BatchService batchService;
@Resource
  private FwCompInterfaceModeClient fwCompInterfaceModeClient;
//@Resource
    //private MSpecMethordTableService mSpecMethordTableService;

    /**
     * D1-2查询管理的部门列表
     */
    @Trace(operationName = "D1-2查询管理的部门列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryManageDeptListRespDto queryManageDeptList(QueryManageDeptListReqDto reqDto) {

        // 步骤0: 1-2-14查询管理的部门列表 - queryManageDeptList
        QueryManageDeptListReq queryManageDeptListReq = new QueryManageDeptListReq();
        if (reqDto != null) {
            queryManageDeptListReq.setRoleMemberId(reqDto.getRoleMemberId());
        }
        queryManageDeptListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());// CURRENT_SPACEID
        queryManageDeptListReq.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());// CURRENT_APPID
        /* 1-2-14查询管理的部门列表[1152] */
        List<ManagedDept> listManagedDept = mManagedDeptService.queryManageDeptList(queryManageDeptListReq);

        // 步骤1: 1-3-09批量查询部门列表 - batchQueryDeptList
        BatchQueryDeptListReq batchQueryDeptListReq = new BatchQueryDeptListReq();
        batchQueryDeptListReq.setDeptList(listManagedDept.stream()
                .map(item -> item.getDeptId())
                .collect(Collectors.toList()));

        /* 1-3-09批量查询部门列表[1153] */
        List<Dept> listDept = mDeptService.batchQueryDeptList(batchQueryDeptListReq);

        // 步骤2: 1-3-12批量查询组织列表 - batchQueryOrg
        BatchQueryOrgReq batchQueryOrgReq = new BatchQueryOrgReq();
        batchQueryOrgReq.setOrgList(listManagedDept.stream()
                .map(item -> item.getOrganizationId())
                .collect(Collectors.toList()));

        /* 1-3-12批量查询组织列表[1346] */
        List<Organization> listOrganization = mOrganizationService.batchQueryOrg(batchQueryOrgReq);

        QueryManageDeptListRespDto retData = new QueryManageDeptListRespDto();

        for (ManagedDept managedDept : listManagedDept) {
            ManagedDeptListDto retElm = new ManagedDeptListDto();
            retElm.setManagedDepId(managedDept.getManagedDepId());
            retElm.setDeptId(managedDept.getDeptId());
            retElm.setOrganizationId(managedDept.getOrganizationId());
            retData.getManagedDeptList().add(retElm);
            for (Dept dept : listDept) {
                if (dept.getDeptId().equals(managedDept.getDeptId())) {
                    retElm.setDeptNumber(dept.getDeptNumber());
                    retElm.setDeptName(dept.getDeptName());
                    retElm.setDeptEnName(dept.getDeptEnName());
                    retElm.setDeptShortName(dept.getDeptShortName());
                }
            }

            for (Organization organization : listOrganization) {
                if (organization.getOrganizationId().equals(managedDept.getOrganizationId())) {
                    retElm.setOrganizationName(organization.getOrganizationName());
                }
            }

        }

        return retData;
    }

    /**
   * D1-2新增管理的部门[1129]
   * gen by moon at 10/1/2022, 11:58:22 PM
   */
  @Trace(operationName = "D1-2新增管理的部门")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public AddManageDeptRespDto addManageDept(AddManageDeptReqDto reqDto){
    
      
      String string_1 =null;
//步骤0: 1-2-14新增管理的部门 - addManageDept
     String string = null;
    ManagedDept managedDept=new ManagedDept();
  if(reqDto!=null){
      managedDept.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:31680_1
managedDept.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:31681_1
managedDept.setRoleMemberId(reqDto.getRoleMemberId());//SimpleFieldAssign//sourceId:31682_1
managedDept.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:31683_1
    }
  
    /*1-2-14新增管理的部门[1352]   */
    Assert.isNull(managedDept.getOrganizationId(),"D1-2新增管理的部门-1-2-14新增管理的部门-组织ID不能为空",false);
Assert.isNull(managedDept.getDeptId(),"D1-2新增管理的部门-1-2-14新增管理的部门-部门ID不能为空",false);
Assert.isNull(managedDept.getRoleMemberId(),"D1-2新增管理的部门-1-2-14新增管理的部门-角色人员ID不能为空",false);
Assert.isNull(managedDept.getOriginalRoleMemberId(),"D1-2新增管理的部门-1-2-14新增管理的部门-身份人员ID不能为空",false);
      string = mManagedDeptService.addManageDept(managedDept);
      
      
      string_1 = string;
    
AddManageDeptRespDto retData = new AddManageDeptRespDto();
  if(string_1!=null){
      retData.setManagedDepId(string_1);//SimpleFieldAssign//sourceId:31694_1
    }
  

  
  
return retData;
  }

    /**
   * D1-2查询权限分配的角色列表[1601]
   * gen by moon at 10/2/2022, 12:14:36 AM
   */
  @Trace(operationName = "D1-2查询权限分配的角色列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryTributPowerRoleListRespDto queryTributPowerRoleList(QueryTributPowerRoleListReqDto reqDto){
    
      
      List<SceneRole> listSceneRole_1 =new ArrayList<>();
//步骤0: 1-2-12查询权限分配列表 - queryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setTypeCode("ROLE");//sourceId:46357_1
queryTributPowerListReq.setIsArchive("FALSE");//sourceId:46370_1
queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:95065_1
  
    /*1-2-12查询权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getTypeCode(),"D1-2查询权限分配的角色列表-1-2-12查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq.getIsArchive(),"D1-2查询权限分配的角色列表-1-2-12查询权限分配列表-是否存档不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      
    
//步骤1: M-去重权限分配对象(特殊方法） - checkTributPowerObject
     //ModelCode: collectionRemoveDuplicateData
        CheckTributPowerObjectRespDto collectionRemoveDuplicateDataRes = null;
    if(listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 ){
          CheckTributPowerObjectReqDto collectionRemoveDuplicateDataReq=new CheckTributPowerObjectReqDto();
  collectionRemoveDuplicateDataReq.setTributPowerList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46361_1
  
    /*M-去重权限分配对象(特殊方法）[1582]  入参一个数据集，通过去重标识，去除数据集中重复的数据 */
    
      collectionRemoveDuplicateDataRes = nbPower.checkTributPowerObject(collectionRemoveDuplicateDataReq);
      
      
      
           }
    
//步骤2: 1-1-06批量查询角色授权列表 - batchQueryPltRoleAuthList
     List<PlatformAuthorize> listPlatformAuthorize =new ArrayList<>();
    BatchQueryPltRoleAuthListReq batchQueryPltRoleAuthListReq=new BatchQueryPltRoleAuthListReq();
  batchQueryPltRoleAuthListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46385_1
if(collectionRemoveDuplicateDataRes!=null){
      //list-field-assign
    batchQueryPltRoleAuthListReq.setPlfAuthList(collectionRemoveDuplicateDataRes.getTributPowerList());//sourceId:46384_1
    }
  
    /*1-1-06批量查询角色授权列表[1602]   */
    Assert.isNull(batchQueryPltRoleAuthListReq.getSubjectLifeCycle(),"D1-2查询权限分配的角色列表-1-1-06批量查询角色授权列表-主体生命周期不能为空",false);
      listPlatformAuthorize = mPlatformAuthorizeService.batchQueryPltRoleAuthList(batchQueryPltRoleAuthListReq);
      
      
      
    
//步骤3: 1-2-08批量查询角色列表 - batchQueryRoleList
     List<SceneRole> listSceneRole =new ArrayList<>();
    if(listPlatformAuthorize !=null&& listPlatformAuthorize.size()>0 ){
          BatchQueryRoleListReq batchQueryRoleListReq=new BatchQueryRoleListReq();
  batchQueryRoleListReq.setRoleList(listPlatformAuthorize.stream().map(item->item.getAuthorizedContentId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46364_1
batchQueryRoleListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46365_1
  
    /*1-2-08批量查询角色列表[700]   */
    Assert.isNull(batchQueryRoleListReq.getSubjectLifeCycle(),"D1-2查询权限分配的角色列表-1-2-08批量查询角色列表-主体生命周期不能为空",false);
      listSceneRole = mSceneRoleService.batchQueryRoleList(batchQueryRoleListReq);
      
      
      listSceneRole_1 = listSceneRole;
           }
    
QueryTributPowerRoleListRespDto retData = new QueryTributPowerRoleListRespDto();
  retData.setRoleList(listSceneRole_1.stream().map(item -> BeanUtil.toBean(item, FrameworkSceneRoleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:46388_1
  

  
  
return retData;
  }

    /**
   * D1-2查询权限列表[555]
   * gen by moon at 8/10/2022, 3:23:54 AM
   */
  @Trace(operationName = "D1-2查询权限列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryPowerListRespDto queryPowerList(QueryPowerListReqDto reqDto){
    
      
      List<Privacy> listPrivacy_1 = new ArrayList<>();
//步骤0: 1-2-11查询权限列表 - queryPowerList
     List<Privacy> listPrivacy =new ArrayList<>();
    QueryPowerListReq queryPowerListReq=new QueryPowerListReq();
  if(reqDto!=null){
      queryPowerListReq.setPrivacyType(reqDto.getPrivacyType());//sourceId:7983_1
queryPowerListReq.setStrategyType(reqDto.getStrategyType());//sourceId:7984_1
queryPowerListReq.setIsportPrivacy(reqDto.getIsportPrivacy());//sourceId:44144_1
queryPowerListReq.setIsDataPrivacy(reqDto.getIsDataPrivacy());//sourceId:44146_1
queryPowerListReq.setBusinessPurposes(reqDto.getBusinessPurposes());//sourceId:44149_1
queryPowerListReq.setIsArchive(reqDto.getIsArchive());//sourceId:26310_1
queryPowerListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:7988_1
    }
  
    /*1-2-11查询权限列表[121]   */
    
      listPrivacy = mPrivacyService.queryPowerList(queryPowerListReq);
      
      listPrivacy_1 = listPrivacy;
    
QueryPowerListRespDto retData = new QueryPowerListRespDto();
  retData.setFrameworkPrivacyList(listPrivacy_1.stream().map(item -> BeanUtil.toBean(item, FrameworkPrivacyDto.class)).collect(Collectors.toList()));//sourceId:26325_1
  

  
  
return retData;
  }

    /**
   * D1-获取用户全部权限[1707]
   * gen by moon at 10/2/2022, 12:21:36 AM
   */
  @Trace(operationName = "D1-获取用户全部权限")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public GetUserAllPowerRespDto getUserAllPower(GetUserAllPowerReqDto reqDto){
    
      
      GetUserAllPowerRespDto getUserAllPowerRes_1 =null;
//步骤0: M-获取用户全部权限（特殊方法） - getUserAllPower
     //ModelCode: getUserAllPower
        GetUserAllPowerRespDto getUserAllPowerRes = null;
    GetUserAllPowerReqDto getUserAllPowerReq=new GetUserAllPowerReqDto();
  if(reqDto!=null){
      getUserAllPowerReq.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:63289_1
    }
  
    /*M-获取用户全部权限（特殊方法）[1706]  前端入参权限数据集，和用户信息中的权限数据集进行比对，返回用户有的权限集合 */
    Assert.isNull(getUserAllPowerReq.getOriginalRoleMemberId(),"D1-获取用户全部权限-M-获取用户全部权限（特殊方法）-身份人员ID不能为空",false);
      getUserAllPowerRes = nbPower.getUserAllPower(getUserAllPowerReq);
      
      
      getUserAllPowerRes_1 = getUserAllPowerRes;
    
GetUserAllPowerRespDto retData = new GetUserAllPowerRespDto();
  if(getUserAllPowerRes_1!=null){
      //list-field-assign
    retData.setPowerCodeList(getUserAllPowerRes_1.getPowerCodeList());//sourceId:51043_1
    }
  

  
  
return retData;
  }

    /**
   * D1-2查管理的部门列表(边界)[1219]
   * gen by moon at 10/15/2022, 5:39:25 PM
   */
  @Trace(operationName = "D1-2查管理的部门列表(边界)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryManageDeptListBorderRespDto queryManageDeptListBorder(QueryManageDeptListBorderReqDto reqDto){
    
      
      List<ManagedDept> listManagedDept_1 =new ArrayList<>();
List<Dept> listDept_1 =new ArrayList<>();
List<Organization> listOrganization_1 =new ArrayList<>();
//步骤0: 1-2-14查询管理的部门列表 - queryManageDeptList
     List<ManagedDept> listManagedDept =new ArrayList<>();
    QueryManageDeptListReq queryManageDeptListReq=new QueryManageDeptListReq();
  queryManageDeptListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:28271_1
if(reqDto!=null){
      queryManageDeptListReq.setRoleMemberId(reqDto.getRoleMemberId());//SimpleFieldAssign//sourceId:28268_1
    }
  
    /*1-2-14查询管理的部门列表[1152]   */
    Assert.isNull(queryManageDeptListReq.getRoleMemberId(),"D1-2查管理的部门列表(边界)-1-2-14查询管理的部门列表-角色人员ID不能为空",false);
Assert.isNull(queryManageDeptListReq.getSpaceId(),"D1-2查管理的部门列表(边界)-1-2-14查询管理的部门列表-创建于空间ID不能为空",false);
      listManagedDept = mManagedDeptService.queryManageDeptList(queryManageDeptListReq);
      
      
      listManagedDept_1 = listManagedDept;
    
//步骤1: 1-3-09批量查询部门列表 - batchQueryDeptList
     List<Dept> listDept =new ArrayList<>();
    if(listManagedDept !=null&& !CollectionUtil.isEmpty(listManagedDept)&& listManagedDept.size()>0 ){
          BatchQueryDeptListReq batchQueryDeptListReq=new BatchQueryDeptListReq();
  batchQueryDeptListReq.setDeptList(listManagedDept.stream().map(item->item.getDeptId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:28275_1
  
    /*1-3-09批量查询部门列表[1153]   */
    
      listDept = mDeptService.batchQueryDeptList(batchQueryDeptListReq);
      
      
      listDept_1 = listDept;
           }
    
//步骤2: 1-3-12批量查询组织列表 - batchQueryOrg
     List<Organization> listOrganization =new ArrayList<>();
    if(listManagedDept !=null&& !CollectionUtil.isEmpty(listManagedDept)&& listManagedDept.size()>0 ){
          BatchQueryOrgReq batchQueryOrgReq=new BatchQueryOrgReq();
  batchQueryOrgReq.setOrgList(listManagedDept.stream().map(item->item.getOrganizationId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:31437_1
  
    /*1-3-12批量查询组织列表[1346]   */
    
      listOrganization = mOrganizationService.batchQueryOrg(batchQueryOrgReq);
      
      
      listOrganization_1 = listOrganization;
           }
    
QueryManageDeptListBorderRespDto retData = new QueryManageDeptListBorderRespDto();
  //数据集融合  MoreListToOneSource
        if(listManagedDept_1!= null&& !CollectionUtil.isEmpty(listManagedDept_1) && !CollectionUtil.isEmpty(listManagedDept_1) ){
          for (ManagedDept managedDept : listManagedDept_1) {
              ManagedDeptListDto retElm = new ManagedDeptListDto();
             retElm.setManagedDepId(managedDept.getManagedDepId());//SimpleFieldAssign//sourceId:13723_2
retElm.setDeptId(managedDept.getDeptId());//SimpleFieldAssign//sourceId:13741_2
retElm.setOrganizationId(managedDept.getOrganizationId());//SimpleFieldAssign//sourceId:13743_2
              retData.getManagedDeptList().add(retElm);
               if(listDept_1!= null&& !CollectionUtil.isEmpty(listDept_1)){
          for (Dept dept : listDept_1) {
                if (dept.getDeptId().equals(managedDept.getDeptId())) {
                 retElm.setDeptNumber(dept.getDeptNumber());//SimpleFieldAssign//sourceId:13726_2
retElm.setDeptName(dept.getDeptName());//SimpleFieldAssign//sourceId:13727_2
retElm.setDeptEnName(dept.getDeptEnName());//SimpleFieldAssign//sourceId:13728_2
retElm.setDeptShortName(dept.getDeptShortName());//SimpleFieldAssign//sourceId:13729_2
                }
            }
          }
        
 if(listOrganization_1!= null&& !CollectionUtil.isEmpty(listOrganization_1)){
          for (Organization organization : listOrganization_1) {
                if (organization.getOrganizationId().equals(managedDept.getOrganizationId())) {
                 retElm.setOrganizationName(organization.getOrganizationName());//SimpleFieldAssign//sourceId:13748_2
                }
            }
          }
        
          }
        }//sourceId:28303_1
  

  
  
return retData;
  }

    /**
   * D1-存档权限分配缓存[1725]
   * gen by moon at 10/2/2022, 12:23:15 AM
   */
  @Trace(operationName = "D1-存档权限分配缓存")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ArchiveTributPowerRedisRespDto archiveTributPowerRedis(ArchiveTributPowerRedisReqDto reqDto){
    
      
      //virtualUsage 1-2-11查询权限详情  2347
      Privacy privacy = null;
    QueryPowerDetailReq queryPowerDetailReq=new QueryPowerDetailReq();
  if(reqDto!=null){
      queryPowerDetailReq.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:60971_1_2347
    }
  
    /*1-2-11查询权限详情[120]   */
    Assert.isNull(queryPowerDetailReq.getPrivacyId(),"D1-存档权限分配缓存-1-2-11查询权限详情-权限ID不能为空",false);
      privacy = mPrivacyService.queryPowerDetail(queryPowerDetailReq);
      Assert.isTrue(privacy== null||  privacy.getStrategyType() ==null,"返回值不能为空",false);
      
      
if((privacy!= null&&  privacy.getStrategyType() !=null && privacy.getStrategyType().equals("ROLE"))) {
        //if(1-2-11查询权限详情.分配策略 等于 角色)  2295
        
List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setTypeCode("ROLE");//sourceId:51913_1_2296
queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257805_1_2296
if(reqDto!=null){
      queryTributPowerListReq.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:51911_1_2296
    }
  
    /*查询角色权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getPrivacyId(),"D1-存档权限分配缓存-查询角色权限分配列表-权限ID不能为空",false);
Assert.isNull(queryTributPowerListReq.getTypeCode(),"D1-存档权限分配缓存-查询角色权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq.getSpaceId(),"D1-存档权限分配缓存-查询角色权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      
if((listPrivacyDistribution!= null&&  listPrivacyDistribution !=null && listPrivacyDistribution.size()>0)) {
        //if(查询角色权限分配列表.权限分配列表数据集条数 大于 0)  2298
        
List<RoleMember> listRoleMember =new ArrayList<>();
    if(listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 &&listPrivacyDistribution!= null&&  listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 ){
          BatchQueryRoleRelByRoleIdsReq batchQueryRoleRelByRoleIdsReq=new BatchQueryRoleRelByRoleIdsReq();
  batchQueryRoleRelByRoleIdsReq.setRoleRelList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:51966_1_2299
  
    /*1-2-13批量角色ID查角色人员列表[1726]   */
    
      listRoleMember = mRoleMemberService.batchQueryRoleRelByRoleIds(batchQueryRoleRelByRoleIdsReq);
      
      
      
           }
//ModelCode: batchClearUserInfoFromRedis
        BatchClearUserInfoFromRedisRespDto batchClearUserInfoFromRedisRes = null;
    if(listRoleMember !=null&& listRoleMember.size()>0 ){
          BatchClearUserInfoFromRedisReqDto batchClearUserInfoFromRedisReq=new BatchClearUserInfoFromRedisReqDto();
  batchClearUserInfoFromRedisReq.setBeginMemberList(listRoleMember.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52758_1_2339
  
    /*M-Redis批量清空用户信息（特殊方法）[1695]  入参身份ID数据集，清除用户就职信息缓存 */
    
      batchClearUserInfoFromRedisRes = nbPower.batchClearUserInfoFromRedis(batchClearUserInfoFromRedisReq);
      
      
      
           }
List<SceneRole> listSceneRole =new ArrayList<>();
    if(listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 &&listPrivacyDistribution!= null&&  listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 ){
          BatchQueryByIdRoleListReq batchQueryByIdRoleListReq=new BatchQueryByIdRoleListReq();
  batchQueryByIdRoleListReq.setRoleIdList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:60947_1_2344
  
    /*1-2-08批量角色ID查询角色列表[1166]   */
    
      listSceneRole = mSceneRoleService.batchQueryByIdRoleList(batchQueryByIdRoleListReq);
      
      
      
           }
List<InductionRecord> listInductionRecord =new ArrayList<>();
    if(listSceneRole !=null&& listSceneRole.size()>0 ){
          BatchQueryInductionRecordByRoleCodeReq batchQueryInductionRecordByRoleCodeReq=new BatchQueryInductionRecordByRoleCodeReq();
  batchQueryInductionRecordByRoleCodeReq.setOrgInductionRecordList(listSceneRole.stream().map(item->item.getRoleCode())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52713_1_2345
batchQueryInductionRecordByRoleCodeReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:52760_1_2345
  
    /*1-3-13批量查就职记录By角色编码[1745]   */
    Assert.isNull(batchQueryInductionRecordByRoleCodeReq.getSubjectLifeCycle(),"D1-存档权限分配缓存-1-3-13批量查就职记录By角色编码-主体生命周期不能为空",false);
      listInductionRecord = mInductionRecordService.batchQueryInductionRecordByRoleCode(batchQueryInductionRecordByRoleCodeReq);
      
      
      
           }
//ModelCode: batchClearUserInfoFromRedis
        BatchClearUserInfoFromRedisRespDto batchClearUserInfoFromRedisRes_1 = null;
    if(listInductionRecord !=null&& listInductionRecord.size()>0 ){
          BatchClearUserInfoFromRedisReqDto batchClearUserInfoFromRedisReq_1=new BatchClearUserInfoFromRedisReqDto();
  batchClearUserInfoFromRedisReq_1.setBeginMemberList(listInductionRecord.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52758_1_2346
  
    /*M-Redis批量清空用户信息（特殊方法）[1695]  入参身份ID数据集，清除用户就职信息缓存 */
    
      batchClearUserInfoFromRedisRes_1 = nbPower.batchClearUserInfoFromRedis(batchClearUserInfoFromRedisReq_1);
      
      
      
           }
//processBranchName:正常结束 ,processBranchId:2314
        
      }
      }
else if((privacy!= null&&  privacy.getStrategyType() !=null && privacy.getStrategyType().equals("PERSONAL"))){
       //elseif(1-2-11查询权限详情.分配策略 等于 个人)  2302
      
List<PrivacyDistribution> listPrivacyDistribution_2 =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq_1=new QueryTributPowerListReq();
  queryTributPowerListReq_1.setTypeCode("PERSONAL");//sourceId:52005_1_2306
queryTributPowerListReq_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257806_1_2306
if(reqDto!=null){
      queryTributPowerListReq_1.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:52004_1_2306
    }
  
    /*查询身份人员权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq_1.getPrivacyId(),"D1-存档权限分配缓存-查询身份人员权限分配列表-权限ID不能为空",false);
Assert.isNull(queryTributPowerListReq_1.getTypeCode(),"D1-存档权限分配缓存-查询身份人员权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq_1.getSpaceId(),"D1-存档权限分配缓存-查询身份人员权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution_2 = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq_1);
      
      
      
//ModelCode: batchClearUserInfoFromRedis
        BatchClearUserInfoFromRedisRespDto batchClearUserInfoFromRedisRes_2 = null;
    if(listPrivacyDistribution_2 !=null&& listPrivacyDistribution_2.size()>0 &&listPrivacyDistribution_2!= null&&  listPrivacyDistribution_2 !=null&& listPrivacyDistribution_2.size()>0 ){
          BatchClearUserInfoFromRedisReqDto batchClearUserInfoFromRedisReq_2=new BatchClearUserInfoFromRedisReqDto();
  batchClearUserInfoFromRedisReq_2.setBeginMemberList(listPrivacyDistribution_2.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52758_1_2340
  
    /*M-Redis批量清空用户信息（特殊方法）[1695]  入参身份ID数据集，清除用户就职信息缓存 */
    
      batchClearUserInfoFromRedisRes_2 = nbPower.batchClearUserInfoFromRedis(batchClearUserInfoFromRedisReq_2);
      
      
      
           }
//processBranchName:正常结束 ,processBranchId:2333
        
    }
else if((privacy!= null&&  privacy.getStrategyType() !=null && privacy.getStrategyType().equals("POST"))){
       //elseif(1-2-11查询权限详情.分配策略 等于 职务)  2303
      
List<PrivacyDistribution> listPrivacyDistribution_4 =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq_2=new QueryTributPowerListReq();
  queryTributPowerListReq_2.setTypeCode("POSITION");//sourceId:51943_1_2309
queryTributPowerListReq_2.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257807_1_2309
if(reqDto!=null){
      queryTributPowerListReq_2.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:51942_1_2309
    }
  
    /*查询职务权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq_2.getPrivacyId(),"D1-存档权限分配缓存-查询职务权限分配列表-权限ID不能为空",false);
Assert.isNull(queryTributPowerListReq_2.getTypeCode(),"D1-存档权限分配缓存-查询职务权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq_2.getSpaceId(),"D1-存档权限分配缓存-查询职务权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution_4 = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq_2);
      
      
      
if((listPrivacyDistribution_4!= null&&  listPrivacyDistribution_4 !=null && listPrivacyDistribution_4.size()>0)) {
        //if(查询职务权限分配列表.权限分配列表数据集条数 大于 0)  2310
        
List<InductionRecord> listInductionRecord_2 =new ArrayList<>();
    if(listPrivacyDistribution_4 !=null&& listPrivacyDistribution_4.size()>0 &&listPrivacyDistribution_4!= null&&  listPrivacyDistribution_4 !=null&& listPrivacyDistribution_4.size()>0 ){
          BatchQueryInductionRecordByPositionIdReq batchQueryInductionRecordByPositionIdReq=new BatchQueryInductionRecordByPositionIdReq();
  batchQueryInductionRecordByPositionIdReq.setOrgInductionRecordList(listPrivacyDistribution_4.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52709_1_2312
batchQueryInductionRecordByPositionIdReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:52752_1_2312
  
    /*1-3-13批量查就职记录By职务ID[1743]   */
    Assert.isNull(batchQueryInductionRecordByPositionIdReq.getSubjectLifeCycle(),"D1-存档权限分配缓存-1-3-13批量查就职记录By职务ID-主体生命周期不能为空",false);
      listInductionRecord_2 = mInductionRecordService.batchQueryInductionRecordByPositionId(batchQueryInductionRecordByPositionIdReq);
      
      
      
           }
//ModelCode: batchClearUserInfoFromRedis
        BatchClearUserInfoFromRedisRespDto batchClearUserInfoFromRedisRes_3 = null;
    if(listInductionRecord_2 !=null&& listInductionRecord_2.size()>0 &&listInductionRecord_2!= null&&  listInductionRecord_2 !=null&& listInductionRecord_2.size()>0 ){
          BatchClearUserInfoFromRedisReqDto batchClearUserInfoFromRedisReq_3=new BatchClearUserInfoFromRedisReqDto();
  batchClearUserInfoFromRedisReq_3.setBeginMemberList(listInductionRecord_2.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52758_1_2341
  
    /*M-Redis批量清空用户信息（特殊方法）[1695]  入参身份ID数据集，清除用户就职信息缓存 */
    
      batchClearUserInfoFromRedisRes_3 = nbPower.batchClearUserInfoFromRedis(batchClearUserInfoFromRedisReq_3);
      
      
      
           }
//processBranchName:正常结束 ,processBranchId:2348
        
      }
    }
else if((privacy!= null&&  privacy.getStrategyType() !=null && privacy.getStrategyType().equals("DEPARTMENT"))){
       //elseif(1-2-11查询权限详情.分配策略 等于 部门)  2304
      
List<PrivacyDistribution> listPrivacyDistribution_6 =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq_3=new QueryTributPowerListReq();
  queryTributPowerListReq_3.setTypeCode("DEPARTMENT_POSITION");//sourceId:51963_1_2319
queryTributPowerListReq_3.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257808_1_2319
if(reqDto!=null){
      queryTributPowerListReq_3.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:51962_1_2319
    }
  
    /*查询部门职务权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq_3.getPrivacyId(),"D1-存档权限分配缓存-查询部门职务权限分配列表-权限ID不能为空",false);
Assert.isNull(queryTributPowerListReq_3.getTypeCode(),"D1-存档权限分配缓存-查询部门职务权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq_3.getSpaceId(),"D1-存档权限分配缓存-查询部门职务权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution_6 = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq_3);
      
      
      
if((listPrivacyDistribution_6!= null&&  listPrivacyDistribution_6 !=null && listPrivacyDistribution_6.size()>0)) {
        //if(查询部门职务权限分配列表.权限分配列表数据集条数 大于 0)  2321
        
List<InductionRecord> listInductionRecord_4 =new ArrayList<>();
    if(listPrivacyDistribution_6 !=null&& listPrivacyDistribution_6.size()>0 &&listPrivacyDistribution_6!= null&&  listPrivacyDistribution_6 !=null&& listPrivacyDistribution_6.size()>0 ){
          BatchQueryInductionRecordByDeptPositionIdReq batchQueryInductionRecordByDeptPositionIdReq=new BatchQueryInductionRecordByDeptPositionIdReq();
  batchQueryInductionRecordByDeptPositionIdReq.setOrgInductionRecordList(listPrivacyDistribution_6.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52711_1_2322
batchQueryInductionRecordByDeptPositionIdReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:52756_1_2322
  
    /*1-3-13批量查就职记录By部门职务ID[1744]   */
    Assert.isNull(batchQueryInductionRecordByDeptPositionIdReq.getSubjectLifeCycle(),"D1-存档权限分配缓存-1-3-13批量查就职记录By部门职务ID-主体生命周期不能为空",false);
      listInductionRecord_4 = mInductionRecordService.batchQueryInductionRecordByDeptPositionId(batchQueryInductionRecordByDeptPositionIdReq);
      
      
      
           }
//ModelCode: batchClearUserInfoFromRedis
        BatchClearUserInfoFromRedisRespDto batchClearUserInfoFromRedisRes_4 = null;
    if(listInductionRecord_4 !=null&& listInductionRecord_4.size()>0 &&listInductionRecord_4!= null&&  listInductionRecord_4 !=null&& listInductionRecord_4.size()>0 ){
          BatchClearUserInfoFromRedisReqDto batchClearUserInfoFromRedisReq_4=new BatchClearUserInfoFromRedisReqDto();
  batchClearUserInfoFromRedisReq_4.setBeginMemberList(listInductionRecord_4.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52758_1_2342
  
    /*M-Redis批量清空用户信息（特殊方法）[1695]  入参身份ID数据集，清除用户就职信息缓存 */
    
      batchClearUserInfoFromRedisRes_4 = nbPower.batchClearUserInfoFromRedis(batchClearUserInfoFromRedisReq_4);
      
      
      
           }
      }
List<PrivacyDistribution> listPrivacyDistribution_8 =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq_4=new QueryTributPowerListReq();
  queryTributPowerListReq_4.setTypeCode("PERSONAL_DEPARTMENT");//sourceId:51985_1_2320
queryTributPowerListReq_4.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257809_1_2320
if(reqDto!=null){
      queryTributPowerListReq_4.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:51984_1_2320
    }
  
    /*查询就职记录权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq_4.getPrivacyId(),"D1-存档权限分配缓存-查询就职记录权限分配列表-权限ID不能为空",false);
Assert.isNull(queryTributPowerListReq_4.getTypeCode(),"D1-存档权限分配缓存-查询就职记录权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq_4.getSpaceId(),"D1-存档权限分配缓存-查询就职记录权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution_8 = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq_4);
      
      
      
if((listPrivacyDistribution_8!= null&&  listPrivacyDistribution_8 !=null && listPrivacyDistribution_8.size()>0)) {
        //if(查询就职记录权限分配列表.权限分配列表数据集条数 大于 0)  2325
        
List<InductionRecord> listInductionRecord_6 =new ArrayList<>();
    if(listPrivacyDistribution_8 !=null&& listPrivacyDistribution_8.size()>0 &&listPrivacyDistribution_8!= null&&  listPrivacyDistribution_8 !=null&& listPrivacyDistribution_8.size()>0 ){
          BatchQueryInductionRecordListReq batchQueryInductionRecordListReq=new BatchQueryInductionRecordListReq();
  batchQueryInductionRecordListReq.setPerOrgInductionRecordList(listPrivacyDistribution_8.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52703_1_2326
batchQueryInductionRecordListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:52706_1_2326
  
    /*1-3-13批量查询就职记录列表[601]   */
    Assert.isNull(batchQueryInductionRecordListReq.getSubjectLifeCycle(),"D1-存档权限分配缓存-1-3-13批量查询就职记录列表-主体生命周期不能为空",false);
      listInductionRecord_6 = mInductionRecordService.batchQueryInductionRecordList(batchQueryInductionRecordListReq);
      
      
      
           }
//ModelCode: batchClearUserInfoFromRedis
        BatchClearUserInfoFromRedisRespDto batchClearUserInfoFromRedisRes_5 = null;
    if(listInductionRecord_6 !=null&& listInductionRecord_6.size()>0 &&listInductionRecord_6!= null&&  listInductionRecord_6 !=null&& listInductionRecord_6.size()>0 ){
          BatchClearUserInfoFromRedisReqDto batchClearUserInfoFromRedisReq_5=new BatchClearUserInfoFromRedisReqDto();
  batchClearUserInfoFromRedisReq_5.setBeginMemberList(listInductionRecord_6.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:52758_1_2343
  
    /*M-Redis批量清空用户信息（特殊方法）[1695]  入参身份ID数据集，清除用户就职信息缓存 */
    
      batchClearUserInfoFromRedisRes_5 = nbPower.batchClearUserInfoFromRedis(batchClearUserInfoFromRedisReq_5);
      
      
      
           }
//processBranchName:正常结束 ,processBranchId:2328
        
      }
    }
ArchiveTributPowerRedisRespDto retData = new ArchiveTributPowerRedisRespDto();
  
  

  
  
return retData;
  }

    /**
   * 存档权限分配[1720]
   * gen by moon at 10/2/2022, 12:22:48 AM
   */
  @Trace(operationName = "存档权限分配")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ArchiveTributPowerRespDto archiveTributPower(ArchiveTributPowerReqDto reqDto){
    
      
      //步骤0: 1-2-12修改权限分配	 - updateTributPower
     boolean bOOLEAN ;
    PrivacyDistribution privacyDistribution=new PrivacyDistribution();
  privacyDistribution.setSubjectLifeCycle("ARCHIVING");//sourceId:51839_1
privacyDistribution.setIsArchive("TRUE");//sourceId:51840_1
if(reqDto!=null){
      privacyDistribution.setPrivacyDistributionId(reqDto.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:51838_1
    }
  
    /*1-2-12修改权限分配	[495]   */
    
      bOOLEAN = mPrivacyDistributionService.updateTributPower(privacyDistribution);
      
      
      
    
ArchiveTributPowerRespDto retData = new ArchiveTributPowerRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-2查询权限分配详情[1115]
   * gen by moon at 10/1/2022, 11:58:09 PM
   */
  @Trace(operationName = "D1-2查询权限分配详情")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryTributPowerDetailRespDto queryTributPowerDetail(QueryTributPowerDetailReqDto reqDto){
    
      
      PrivacyDistribution privacyDistribution_1 =null;
Privacy privacy_1 =null;
InductionRecord inductionRecord_1 =null;
Userinfo userinfo_1 =null;
//步骤0: 1-2-12查询权限分配详情 - queryTributPowerDetail
     PrivacyDistribution privacyDistribution = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq=new QueryTributPowerDetailReq();
  if(reqDto!=null){
      queryTributPowerDetailReq.setPrivacyDistributionId(reqDto.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:46691_1
    }
  
    /*1-2-12查询权限分配详情[498]   */
    Assert.isNull(queryTributPowerDetailReq.getPrivacyDistributionId(),"D1-2查询权限分配详情-1-2-12查询权限分配详情-权限分配ID不能为空",false);
      privacyDistribution = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq);
      
      
      privacyDistribution_1 = privacyDistribution;
    
//步骤1: 1-2-11查询权限详情 - queryPowerDetail
     Privacy privacy = null;
    if(privacyDistribution !=null){
          QueryPowerDetailReq queryPowerDetailReq=new QueryPowerDetailReq();
  if(privacyDistribution!=null){
      queryPowerDetailReq.setPrivacyId(privacyDistribution.getPrivacyId());//SimpleFieldAssign//sourceId:46693_1
    }
  
    /*1-2-11查询权限详情[120]   */
    Assert.isNull(queryPowerDetailReq.getPrivacyId(),"D1-2查询权限分配详情-1-2-11查询权限详情-权限ID不能为空",false);
      privacy = mPrivacyService.queryPowerDetail(queryPowerDetailReq);
      
      
      privacy_1 = privacy;
           }
    
//步骤2: 1-3-13查询就职记录详情 - queryinductionRecordDetail
     InductionRecord inductionRecord = null;
    if(privacyDistribution !=null){
          QueryinductionRecordDetailReq queryinductionRecordDetailReq=new QueryinductionRecordDetailReq();
  if(privacyDistribution!=null){
      queryinductionRecordDetailReq.setInductionRecordId(privacyDistribution.getOperationInductionId());//SimpleFieldAssign//sourceId:46734_1
    }
  
    /*1-3-13查询就职记录详情[165]   */
    Assert.isNull(queryinductionRecordDetailReq.getInductionRecordId(),"D1-2查询权限分配详情-1-3-13查询就职记录详情-就职记录ID不能为空",false);
      inductionRecord = mInductionRecordService.queryinductionRecordDetail(queryinductionRecordDetailReq);
      
      
      inductionRecord_1 = inductionRecord;
           }
    
//步骤3: 1-2-02查询个人资料详情 - queryUserinfoDetail
     Userinfo userinfo = null;
    if(inductionRecord !=null){
          QueryUserinfoDetailReq queryUserinfoDetailReq=new QueryUserinfoDetailReq();
  if(inductionRecord!=null){
      queryUserinfoDetailReq.setUserId(inductionRecord.getUserId());//SimpleFieldAssign//sourceId:46815_1
    }
  
    /*1-2-02查询个人资料详情[155]   */
    Assert.isNull(queryUserinfoDetailReq.getUserId(),"D1-2查询权限分配详情-1-2-02查询个人资料详情-账号不能为空",false);
      userinfo = mUserinfoService.queryUserinfoDetail(queryUserinfoDetailReq);
      
      
      userinfo_1 = userinfo;
           }
    
QueryTributPowerDetailRespDto retData = new QueryTributPowerDetailRespDto();
  if(privacyDistribution_1!=null){
      retData.setPrivacyDistributionId(privacyDistribution_1.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:46723_1
retData.setOperationInductionId(privacyDistribution_1.getOperationInductionId());//SimpleFieldAssign//sourceId:46730_1
retData.setOperateTime(privacyDistribution_1.getOperateTime());//SimpleFieldAssign//sourceId:46732_1
    }
if(privacy_1!=null){
      retData.setPrivacyId(privacy_1.getPrivacyId());//SimpleFieldAssign//sourceId:46724_1
retData.setPrivacyCode(privacy_1.getPrivacyCode());//SimpleFieldAssign//sourceId:46726_1
retData.setPrivacyName(privacy_1.getPrivacyName());//SimpleFieldAssign//sourceId:46727_1
retData.setPrivacyIntroduce(privacy_1.getPrivacyIntroduce());//SimpleFieldAssign//sourceId:46728_1
retData.setPrivacyLogo(privacy_1.getPrivacyLogo());//SimpleFieldAssign//sourceId:46729_1
retData.setStrategyType(privacy_1.getStrategyType());//SimpleFieldAssign//sourceId:46731_1
    }
if(inductionRecord_1!=null){
      retData.setOriginalRoleMemberId(inductionRecord_1.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:46822_1
    }
if(userinfo_1!=null){
      retData.setUserId(userinfo_1.getUserId());//SimpleFieldAssign//sourceId:46820_1
retData.setUserFace(userinfo_1.getUserFace());//SimpleFieldAssign//sourceId:46824_1
retData.setIdCardName(userinfo_1.getIdCardName());//SimpleFieldAssign//sourceId:46821_1
retData.setNickName(userinfo_1.getNickName());//SimpleFieldAssign//sourceId:46823_1
    }
  

  
  
return retData;
  }

    /**
   * D1-2查询权限分配列表[704]
   * gen by moon at 10/2/2022, 7:46:31 AM
   */
  @Trace(operationName = "D1-2查询权限分配列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @BanAuto
  @Override
  public QueryTributPowerListRespDto queryTributPowerList(QueryTributPowerListReqDto reqDto){
    
      
      List<PrivacyDistribution> listPrivacyDistribution_1 =new ArrayList<>();
List<Privacy> listPrivacy_1 =new ArrayList<>();
//步骤0: 1-2-12查询权限分配列表 - queryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257497_1
if(reqDto!=null){
      queryTributPowerListReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:26383_1
queryTributPowerListReq.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:26384_1
queryTributPowerListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:26385_1
queryTributPowerListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:26386_1
    }
  
    /*1-2-12查询权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getSpaceId(),"D1-2查询权限分配列表-1-2-12查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      listPrivacyDistribution_1 = listPrivacyDistribution;
    
//步骤1: 1-2-11批量查询权限列表 - batchQueryPowerList
     List<Privacy> listPrivacy =new ArrayList<>();
    if(listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 ){
          BatchQueryPowerListReq batchQueryPowerListReq=new BatchQueryPowerListReq();
  batchQueryPowerListReq.setPowerIdList(listPrivacyDistribution.stream().map(item->item.getPrivacyId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:30059_1
batchQueryPowerListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46867_1
  
    /*1-2-11批量查询权限列表[1245]   */
    Assert.isNull(batchQueryPowerListReq.getSubjectLifeCycle(),"D1-2查询权限分配列表-1-2-11批量查询权限列表-主体生命周期不能为空",false);
      listPrivacy = mPrivacyService.batchQueryPowerList(batchQueryPowerListReq);
      
      
      listPrivacy_1 = listPrivacy;
           }
    
QueryTributPowerListRespDto retData = new QueryTributPowerListRespDto();
  //数据集融合  MoreListToOneSource
        if(listPrivacyDistribution_1!= null && !CollectionUtil.isEmpty(listPrivacyDistribution_1) ){
          for (PrivacyDistribution privacyDistribution : listPrivacyDistribution_1) {
              TributPowerDto retElm = new TributPowerDto();
             retElm.setPrivacyDistributionId(privacyDistribution.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:10804_2
retElm.setPrivacyId(privacyDistribution.getPrivacyId());//SimpleFieldAssign//sourceId:10805_2
retElm.setPrivacyCode(privacyDistribution.getPrivacyCode());//SimpleFieldAssign//sourceId:10806_2
retElm.setTypeCode(privacyDistribution.getTypeCode());//SimpleFieldAssign//sourceId:10807_2
retElm.setAllocationObjectId(privacyDistribution.getAllocationObjectId());//SimpleFieldAssign//sourceId:10808_2
retElm.setSubjectLifeCycle(privacyDistribution.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:10809_2
retElm.setIsArchive(privacyDistribution.getIsArchive());//SimpleFieldAssign//sourceId:10810_2
retElm.setOperationInductionId(privacyDistribution.getOperationInductionId());//SimpleFieldAssign//sourceId:10811_2
retElm.setOperateTime(privacyDistribution.getOperateTime());//SimpleFieldAssign//sourceId:10812_2

               if(listPrivacy_1!= null){
          for (Privacy privacy : listPrivacy_1) {
                if (privacy.getPrivacyId().equals(privacyDistribution.getPrivacyId())) {
                 retElm.setPrivacyLogo(privacy.getPrivacyLogo());//SimpleFieldAssign//sourceId:12841_2
retElm.setPrivacyName(privacy.getPrivacyName());//SimpleFieldAssign//sourceId:12840_2
                    retData.getTributPowerList().add(retElm);
                }
            }
          }
        
          }
        }//sourceId:26398_1
  

  
  
return retData;
  }

    /**
   * D1-2修改权限（平台）[563]
   * gen by moon at 8/10/2022, 3:24:02 AM
   */
  @Trace(operationName = "D1-2修改权限（平台）")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public UpdatePowerRespDto updatePower(UpdatePowerReqDto reqDto){
    
      
      //virtualUsage 1-2-11修改权限（基础修改）  1046
      boolean bOOLEAN ;
    Privacy privacy=new Privacy();
  if(reqDto!=null){
      privacy.setPrivacyId(reqDto.getPrivacyId());//sourceId:11449_1_1046
privacy.setPrivacyCode(reqDto.getPrivacyCode());//sourceId:28401_1_1046
privacy.setPrivacyName(reqDto.getPrivacyName());//sourceId:11450_1_1046
privacy.setPrivacyIntroduce(reqDto.getPrivacyIntroduce());//sourceId:11451_1_1046
privacy.setPrivacyLogo(reqDto.getPrivacyLogo());//sourceId:11452_1_1046
privacy.setPrivacyType(reqDto.getPrivacyType());//sourceId:11459_1_1046
privacy.setStrategyType(reqDto.getStrategyType());//sourceId:11453_1_1046
privacy.setIsportPrivacy(reqDto.getIsportPrivacy());//sourceId:43865_1_1046
privacy.setPrivacyRoute(reqDto.getPrivacyRoute());//sourceId:34902_1_1046
privacy.setIsDataPrivacy(reqDto.getIsDataPrivacy());//sourceId:43866_1_1046
privacy.setDataModel(reqDto.getDataModel());//sourceId:28402_1_1046
privacy.setPrivacyCategory(reqDto.getPrivacyCategory());//sourceId:43867_1_1046
privacy.setBusinessPurposes(reqDto.getBusinessPurposes());//sourceId:43868_1_1046
privacy.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:11456_1_1046
    }
  
    /*1-2-11修改权限（基础修改）[118]   */
    Assert.isNull(privacy.getPrivacyId(),"D1-2修改权限（平台）-1-2-11修改权限（基础修改）-权限ID不能为空",false);
      bOOLEAN = mPrivacyService.updatePower(privacy);
      
      
if((reqDto!= null&&  reqDto.getIsDataPrivacy() !=null && reqDto.getIsDataPrivacy().equals("FALSE"))) {
        //if(D1-2修改权限（平台）.是否数据权限 等于 否)  1047
        
boolean bOOLEAN_1 ;
    Privacy privacy_1=new Privacy();
  privacy_1.setPrivacyCategory("NULL");//sourceId:43908_1_1048
if(reqDto!=null){
      privacy_1.setPrivacyId(reqDto.getPrivacyId());//sourceId:43906_1_1048
privacy_1.setDataModel(reqDto.getDataModel());//sourceId:43907_1_1048
privacy_1.setBusinessPurposes(reqDto.getBusinessPurposes());//sourceId:43909_1_1048
    }
  
    /*1-2-11修改权限（清除数据权限字段）[118]   */
    Assert.isNull(privacy_1.getPrivacyId(),"D1-2修改权限（平台）-1-2-11修改权限（清除数据权限字段）-权限ID不能为空",false);
Assert.isNull(privacy_1.getDataModel(),"D1-2修改权限（平台）-1-2-11修改权限（清除数据权限字段）-数据父模型编码不能为空",false);
Assert.isNull(privacy_1.getPrivacyCategory(),"D1-2修改权限（平台）-1-2-11修改权限（清除数据权限字段）-权限类别不能为空",false);
Assert.isNull(privacy_1.getBusinessPurposes(),"D1-2修改权限（平台）-1-2-11修改权限（清除数据权限字段）-权限业务用途不能为空",false);
      bOOLEAN_1 = mPrivacyService.updatePower(privacy_1);
      
      
//processBranchName:正常结束 ,processBranchId:1049
        
      }
else{
       //else  1051
      
//processBranchName:正常结束 ,processBranchId:1052
        
    }
UpdatePowerRespDto retData = new UpdatePowerRespDto();
  
  

  
  
return retData;
  }

    /**
     * D1-2查询部门管理权限详情(边界)[1806]
     * gen by moon at 2022/7/3 下午5:16:41
     */
    @Trace(operationName = "D1-2查询部门管理权限详情(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptPowerDetailBorderRespDto queryDeptPowerDetailBorder(QueryDeptPowerDetailBorderReqDto reqDto) {


        Dept dept_1 = null;
//步骤0: 1-2-14查询管理的部门详情 - queryManageDeptDetail
        ManagedDept managedDept = null;
        QueryManageDeptDetailReq queryManageDeptDetailReq = new QueryManageDeptDetailReq();
        queryManageDeptDetailReq.setDeptId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecDeptId());//CURRENT_DEPTID//sourceId:55241_1
        queryManageDeptDetailReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:55256_1

        /*1-2-14查询管理的部门详情[1087]   */
        managedDept = mManagedDeptService.queryManageDeptDetail(queryManageDeptDetailReq);


//步骤1: 1-3-09查询部门详情 - queryDeptDetail
        Dept dept = null;
        if (managedDept != null) {
            QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
            queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:55495_1
            if (managedDept != null) {
                queryDeptDetailReq.setDeptId(managedDept.getDeptId());//sourceId:55473_1
            }

            /*1-3-09查询部门详情[218]   */
            dept = mDeptService.queryDeptDetail(queryDeptDetailReq);

            dept_1 = dept;
        }

        QueryDeptPowerDetailBorderRespDto retData = new QueryDeptPowerDetailBorderRespDto();
        if (dept_1 != null) {
            retData.setDeptId(dept_1.getDeptId());//sourceId:55505_1
            retData.setDeptCode(dept_1.getDeptCode());//sourceId:55506_1
            retData.setDeptName(dept_1.getDeptName());//sourceId:55507_1
            retData.setDeptEnName(dept_1.getDeptEnName());//sourceId:55508_1
            retData.setDeptShortName(dept_1.getDeptShortName());//sourceId:55509_1
        }


        return retData;
    }

    /**
   * D1-2存档部门权限分配[1614]
   * gen by moon at 10/15/2022, 5:39:32 PM
   */
  @Trace(operationName = "D1-2存档部门权限分配")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ArchiveTribuDeptPowerRespDto archiveTribuDeptPower(ArchiveTribuDeptPowerReqDto reqDto){
    
      
      //步骤0: 1-2-12查询权限分配详情 - queryTributPowerDetail
     PrivacyDistribution privacyDistribution = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq=new QueryTributPowerDetailReq();
  queryTributPowerDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:379303_1
queryTributPowerDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:379302_1
if(reqDto!=null){
      queryTributPowerDetailReq.setPrivacyDistributionId(reqDto.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:379301_1
    }
  
    /*1-2-12查询权限分配关系是否当前有效[498]   */
    Assert.isNull(queryTributPowerDetailReq.getPrivacyDistributionId(),"D1-2存档部门权限分配-1-2-12查询权限分配关系是否当前有效-权限分配ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getSubjectLifeCycle(),"D1-2存档部门权限分配-1-2-12查询权限分配关系是否当前有效-主体生命周期不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getSpaceId(),"D1-2存档部门权限分配-1-2-12查询权限分配关系是否当前有效-创建于空间ID不能为空",false);
      privacyDistribution = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq);
      Assert.isTrue(privacyDistribution== null||  privacyDistribution.getPrivacyDistributionId() ==null,"返回值不能为空",false);
      
      
    
//步骤1: 1-2-12修改权限分配	 - updateTributPower
     boolean bOOLEAN ;
    if(privacyDistribution !=null){
          PrivacyDistribution privacyDistribution_2=new PrivacyDistribution();
  privacyDistribution_2.setSubjectLifeCycle("ARCHIVING");//sourceId:46987_1
privacyDistribution_2.setIsArchive("TRUE");//sourceId:46991_1
if(privacyDistribution!=null){
      privacyDistribution_2.setPrivacyDistributionId(privacyDistribution.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:379259_1
    }
  
    /*1-2-12修改权限分配（解除权限分配）[495]   */
    Assert.isNull(privacyDistribution_2.getPrivacyDistributionId(),"D1-2存档部门权限分配-1-2-12修改权限分配（解除权限分配）-权限分配ID不能为空",false);
Assert.isNull(privacyDistribution_2.getSubjectLifeCycle(),"D1-2存档部门权限分配-1-2-12修改权限分配（解除权限分配）-主体生命周期不能为空",false);
Assert.isNull(privacyDistribution_2.getIsArchive(),"D1-2存档部门权限分配-1-2-12修改权限分配（解除权限分配）-是否存档不能为空",false);
      bOOLEAN = mPrivacyDistributionService.updateTributPower(privacyDistribution_2);
      
      
      
           }
    
ArchiveTribuDeptPowerRespDto retData = new ArchiveTribuDeptPowerRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-2查询分配的部门权限列表[1612]
   * gen by moon at 10/2/2022, 12:15:26 AM
   */
  @Trace(operationName = "D1-2查询分配的部门权限列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryTribuDeptPowerListRespDto queryTribuDeptPowerList(QueryTribuDeptPowerListReqDto reqDto){
    
      
      List<Privacy> listPrivacy_1 =new ArrayList<>();
//步骤0: 1-2-12查询权限分配列表 - queryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setTypeCode("DEPARTMENT");//sourceId:46653_1
queryTributPowerListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46655_1
queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257788_1
if(reqDto!=null){
      queryTributPowerListReq.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:46658_1
    }
  
    /*1-2-12查询权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getTypeCode(),"D1-2查询分配的部门权限列表-1-2-12查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq.getAllocationObjectId(),"D1-2查询分配的部门权限列表-1-2-12查询权限分配列表-分配对象ID不能为空",false);
Assert.isNull(queryTributPowerListReq.getSubjectLifeCycle(),"D1-2查询分配的部门权限列表-1-2-12查询权限分配列表-主体生命周期不能为空",false);
Assert.isNull(queryTributPowerListReq.getSpaceId(),"D1-2查询分配的部门权限列表-1-2-12查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      
    
//步骤1: 1-2-11批量查询权限列表 - batchQueryPowerList
     List<Privacy> listPrivacy =new ArrayList<>();
    if(listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 ){
          BatchQueryPowerListReq batchQueryPowerListReq=new BatchQueryPowerListReq();
  batchQueryPowerListReq.setPowerIdList(listPrivacyDistribution.stream().map(item->item.getPrivacyId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46646_1
batchQueryPowerListReq.setStrategyType("DEPARTMENT");//sourceId:46651_1
batchQueryPowerListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46649_1
  
    /*1-2-11批量查询权限列表[1245]   */
    Assert.isNull(batchQueryPowerListReq.getStrategyType(),"D1-2查询分配的部门权限列表-1-2-11批量查询权限列表-分配策略不能为空",false);
Assert.isNull(batchQueryPowerListReq.getSubjectLifeCycle(),"D1-2查询分配的部门权限列表-1-2-11批量查询权限列表-主体生命周期不能为空",false);
      listPrivacy = mPrivacyService.batchQueryPowerList(batchQueryPowerListReq);
      
      
      listPrivacy_1 = listPrivacy;
           }
    
QueryTribuDeptPowerListRespDto retData = new QueryTribuDeptPowerListRespDto();
  retData.setFrameworkPrivacyList(listPrivacy_1.stream().map(item -> BeanUtil.toBean(item, FrameworkPrivacyDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:46733_1
  

  
  
return retData;
  }

    /**
   * D1-2查询权限分配的部门职务列表[1608]
   * gen by moon at 10/2/2022, 12:15:08 AM
   */
  @Trace(operationName = "D1-2查询权限分配的部门职务列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryTributPowerDeptPositionListRespDto queryTributPowerDeptPositionList(QueryTributPowerDeptPositionListReqDto reqDto){
    
      
      List<DeptPositionRelationship> listDeptPositionRelationship_1 =new ArrayList<>();
List<Position> listPosition_1 =new ArrayList<>();
List<PositionGrade> listPositionGrade_1 =new ArrayList<>();
//步骤0: 1-2-12查询权限分配列表 - queryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setTypeCode("DEPARTMENT_POSITION");//sourceId:46510_1
queryTributPowerListReq.setIsArchive("FALSE");//sourceId:46512_1
queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:48722_1
  
    /*1-2-12查询权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getTypeCode(),"D1-2查询权限分配的部门职务列表-1-2-12查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq.getIsArchive(),"D1-2查询权限分配的部门职务列表-1-2-12查询权限分配列表-是否存档不能为空",false);
Assert.isNull(queryTributPowerListReq.getSpaceId(),"D1-2查询权限分配的部门职务列表-1-2-12查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      
    
//步骤1: M-去重权限分配对象(特殊方法） - checkTributPowerObject
     //ModelCode: collectionRemoveDuplicateData
        CheckTributPowerObjectRespDto collectionRemoveDuplicateDataRes = null;
    if(listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 ){
          CheckTributPowerObjectReqDto collectionRemoveDuplicateDataReq=new CheckTributPowerObjectReqDto();
  collectionRemoveDuplicateDataReq.setTributPowerList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46514_1
  
    /*M-去重权限分配对象(特殊方法）[1582]  入参一个数据集，通过去重标识，去除数据集中重复的数据 */
    
      collectionRemoveDuplicateDataRes = nbPower.checkTributPowerObject(collectionRemoveDuplicateDataReq);
      
      
      
           }
    
//步骤2: 1-3-11批量查询组织部门职务列表 - batchQueryOrgDeptPositionList
     List<DeptPositionRelationship> listDeptPositionRelationship =new ArrayList<>();
    BatchQueryOrgDeptPositionListReq batchQueryOrgDeptPositionListReq=new BatchQueryOrgDeptPositionListReq();
  batchQueryOrgDeptPositionListReq.setOrgTypeCode("DEPARTMENT");//sourceId:46517_1
batchQueryOrgDeptPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46520_1
if(collectionRemoveDuplicateDataRes!=null){
      //list-field-assign
    batchQueryOrgDeptPositionListReq.setOrgDeptPositionList(collectionRemoveDuplicateDataRes.getTributPowerList());//sourceId:46526_1
    }
if(reqDto!=null){
      batchQueryOrgDeptPositionListReq.setOrgEntityId(reqDto.getOrgEntityId());//SimpleFieldAssign//sourceId:46518_1
    }
  
    /*1-3-11批量查询组织部门职务列表[1600]   */
    Assert.isNull(batchQueryOrgDeptPositionListReq.getOrgTypeCode(),"D1-2查询权限分配的部门职务列表-1-3-11批量查询组织部门职务列表-所属实例类型编码不能为空",false);
Assert.isNull(batchQueryOrgDeptPositionListReq.getOrgEntityId(),"D1-2查询权限分配的部门职务列表-1-3-11批量查询组织部门职务列表-所属对象实例ID不能为空",false);
Assert.isNull(batchQueryOrgDeptPositionListReq.getSubjectLifeCycle(),"D1-2查询权限分配的部门职务列表-1-3-11批量查询组织部门职务列表-主体生命周期不能为空",false);
      listDeptPositionRelationship = mDeptPositionRelationshipService.batchQueryOrgDeptPositionList(batchQueryOrgDeptPositionListReq);
      
      
      listDeptPositionRelationship_1 = listDeptPositionRelationship;
    
//步骤3: 1-3-05批量查询职务列表 - batchQueryPositionList
     List<Position> listPosition =new ArrayList<>();
    if(listDeptPositionRelationship !=null&& listDeptPositionRelationship.size()>0 ){
          BatchQueryPositionListReq batchQueryPositionListReq=new BatchQueryPositionListReq();
  batchQueryPositionListReq.setPositionList(listDeptPositionRelationship.stream().map(item->item.getPositionId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46528_1
batchQueryPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46531_1
  
    /*1-3-05批量查询职务列表[1460]   */
    Assert.isNull(batchQueryPositionListReq.getSubjectLifeCycle(),"D1-2查询权限分配的部门职务列表-1-3-05批量查询职务列表-主体生命周期不能为空",false);
      listPosition = mPositionService.batchQueryPositionList(batchQueryPositionListReq);
      
      
      listPosition_1 = listPosition;
           }
    
//步骤4: 1-3-03批量查询职务级别列表 - batchQueryPositionGradeList
     List<PositionGrade> listPositionGrade =new ArrayList<>();
    if(listPosition !=null&& listPosition.size()>0 ){
          BatchQueryPositionGradeListReq batchQueryPositionGradeListReq=new BatchQueryPositionGradeListReq();
  batchQueryPositionGradeListReq.setOrgPositionGradeList(listPosition.stream().map(item->item.getPositionGradeId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46601_1
batchQueryPositionGradeListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46602_1
  
    /*1-3-03批量查询职务级别列表[1482]   */
    Assert.isNull(batchQueryPositionGradeListReq.getSubjectLifeCycle(),"D1-2查询权限分配的部门职务列表-1-3-03批量查询职务级别列表-主体生命周期不能为空",false);
      listPositionGrade = mPositionGradeService.batchQueryPositionGradeList(batchQueryPositionGradeListReq);
      
      
      listPositionGrade_1 = listPositionGrade;
           }
    
QueryTributPowerDeptPositionListRespDto retData = new QueryTributPowerDeptPositionListRespDto();
  //数据集融合  MoreListToOneSource
        if(listPosition_1!= null && !CollectionUtil.isEmpty(listPosition_1) ){
          for (Position position : listPosition_1) {
              PositionDto retElm = new PositionDto();
             retElm.setPositionIdName(position.getPositionIdName());//SimpleFieldAssign//sourceId:22839_2
retElm.setPositionNumber(position.getPositionNumber());//SimpleFieldAssign//sourceId:22840_2
retElm.setPositionType(position.getPositionType());//SimpleFieldAssign//sourceId:22841_2
retElm.setStationId(position.getStationId());//SimpleFieldAssign//sourceId:22843_2
retElm.setRoleCode(position.getRoleCode());//SimpleFieldAssign//sourceId:22844_2
              retData.getPositionList().add(retElm);
               if(listPositionGrade_1!= null){
          for (PositionGrade positionGrade : listPositionGrade_1) {
                if (positionGrade.getPositionGradeId().equals(position.getPositionGradeId())) {
                 retElm.setPositionGradeId(positionGrade.getPositionGradeId());//SimpleFieldAssign//sourceId:22910_2
retElm.setPositionGradeName(positionGrade.getPositionGradeName());//SimpleFieldAssign//sourceId:22909_2
                }
            }
          }
        
          }
        }//sourceId:46534_1
  

  
  
return retData;
  }

    /**
   * D1-2查询权限分配的职务列表[1599]
   * gen by moon at 10/23/2022, 12:02:43 AM
   */
  @Trace(operationName = "D1-2查询权限分配的职务列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryTributPowerPositionListRespDto queryTributPowerPositionList(QueryTributPowerPositionListReqDto reqDto){
    
      
      List<Position> listPosition_1 =new ArrayList<>();
List<PositionGrade> listPositionGrade_1 =new ArrayList<>();
//步骤0: 1-2-12查询权限分配列表 - queryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setTypeCode("POSITION");//sourceId:46297_1
queryTributPowerListReq.setIsArchive("FALSE");//sourceId:46393_1
queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257786_1
  
    /*1-2-12查询权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getTypeCode(),"D1-2查询权限分配的职务列表-1-2-12查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq.getIsArchive(),"D1-2查询权限分配的职务列表-1-2-12查询权限分配列表-是否存档不能为空",false);
Assert.isNull(queryTributPowerListReq.getSpaceId(),"D1-2查询权限分配的职务列表-1-2-12查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      
    
//步骤1: M-去重权限分配对象(特殊方法） - checkTributPowerObject
     //ModelCode: collectionRemoveDuplicateData
        CheckTributPowerObjectRespDto collectionRemoveDuplicateDataRes = null;
    if(listPrivacyDistribution !=null&& !CollectionUtil.isEmpty(listPrivacyDistribution)&& listPrivacyDistribution.size()>0 ){
          CheckTributPowerObjectReqDto collectionRemoveDuplicateDataReq=new CheckTributPowerObjectReqDto();
  collectionRemoveDuplicateDataReq.setTributPowerList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46299_1
  
    /*M-去重权限分配对象(特殊方法）[1582]  入参一个数据集，通过去重标识，去除数据集中重复的数据 */
    
      collectionRemoveDuplicateDataRes = nbPower.checkTributPowerObject(collectionRemoveDuplicateDataReq);
      
      
      
           }
    
//步骤2: 1-3-11批量查询组织部门职务列表 - batchQueryOrgDeptPositionList
     List<DeptPositionRelationship> listDeptPositionRelationship =new ArrayList<>();
    BatchQueryOrgDeptPositionListReq batchQueryOrgDeptPositionListReq=new BatchQueryOrgDeptPositionListReq();
  batchQueryOrgDeptPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46327_1
if(collectionRemoveDuplicateDataRes!=null){
      batchQueryOrgDeptPositionListReq.setOrgDeptPositionList(collectionRemoveDuplicateDataRes.getTributPowerList());//list-field-assign//sourceId:46324_1
    }
if(reqDto!=null){
      batchQueryOrgDeptPositionListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:46325_1
    }
  
    /*1-3-11批量查询组织部门职务列表（查组织）[1600]   */
    Assert.isNull(batchQueryOrgDeptPositionListReq.getSubjectLifeCycle(),"D1-2查询权限分配的职务列表-1-3-11批量查询组织部门职务列表（查组织）-主体生命周期不能为空",false);
Assert.isNull(batchQueryOrgDeptPositionListReq.getOrganizationId(),"D1-2查询权限分配的职务列表-1-3-11批量查询组织部门职务列表（查组织）-组织ID不能为空",false);
      listDeptPositionRelationship = mDeptPositionRelationshipService.batchQueryOrgDeptPositionList(batchQueryOrgDeptPositionListReq);
      
      
      
    
//步骤3: 1-3-05批量查询职务列表 - batchQueryPositionList
     List<Position> listPosition =new ArrayList<>();
    if(listDeptPositionRelationship !=null&& !CollectionUtil.isEmpty(listDeptPositionRelationship)&& listDeptPositionRelationship.size()>0 ){
          BatchQueryPositionListReq batchQueryPositionListReq=new BatchQueryPositionListReq();
  batchQueryPositionListReq.setPositionList(listDeptPositionRelationship.stream().map(item->item.getPositionId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46329_1
batchQueryPositionListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46332_1
  
    /*1-3-05批量查询职务列表[1460]   */
    Assert.isNull(batchQueryPositionListReq.getSubjectLifeCycle(),"D1-2查询权限分配的职务列表-1-3-05批量查询职务列表-主体生命周期不能为空",false);
      listPosition = mPositionService.batchQueryPositionList(batchQueryPositionListReq);
      
      
      listPosition_1 = listPosition;
           }
    
//步骤4: 1-3-03批量查询职务级别列表 - batchQueryPositionGradeList
     List<PositionGrade> listPositionGrade =new ArrayList<>();
    if(listPosition !=null&& !CollectionUtil.isEmpty(listPosition)&& listPosition.size()>0 ){
          BatchQueryPositionGradeListReq batchQueryPositionGradeListReq=new BatchQueryPositionGradeListReq();
  batchQueryPositionGradeListReq.setOrgPositionGradeList(listPosition.stream().map(item->item.getPositionGradeId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46616_1
batchQueryPositionGradeListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46617_1
  
    /*1-3-03批量查询职务级别列表[1482]   */
    Assert.isNull(batchQueryPositionGradeListReq.getSubjectLifeCycle(),"D1-2查询权限分配的职务列表-1-3-03批量查询职务级别列表-主体生命周期不能为空",false);
      listPositionGrade = mPositionGradeService.batchQueryPositionGradeList(batchQueryPositionGradeListReq);
      
      
      listPositionGrade_1 = listPositionGrade;
           }
    
QueryTributPowerPositionListRespDto retData = new QueryTributPowerPositionListRespDto();
  //数据集融合  MoreListToOneSource
        if(listPosition_1!= null&& !CollectionUtil.isEmpty(listPosition_1) && !CollectionUtil.isEmpty(listPosition_1) ){
          for (Position position : listPosition_1) {
              PositionDto retElm = new PositionDto();
             retElm.setPositionId(position.getPositionId());//SimpleFieldAssign//sourceId:22397_2
retElm.setPositionIdName(position.getPositionIdName());//SimpleFieldAssign//sourceId:22398_2
retElm.setPositionNumber(position.getPositionNumber());//SimpleFieldAssign//sourceId:22411_2
retElm.setPositionType(position.getPositionType());//SimpleFieldAssign//sourceId:22399_2
retElm.setStationId(position.getStationId());//SimpleFieldAssign//sourceId:22413_2
retElm.setRoleCode(position.getRoleCode());//SimpleFieldAssign//sourceId:22414_2
retElm.setPositionGradeId(position.getPositionGradeId());//SimpleFieldAssign//sourceId:22412_2
              retData.getPositionList().add(retElm);
               if(listPositionGrade_1!= null&& !CollectionUtil.isEmpty(listPositionGrade_1)){
          for (PositionGrade positionGrade : listPositionGrade_1) {
                if (positionGrade.getPositionGradeId().equals(position.getPositionGradeId())) {
                 retElm.setPositionGradeName(positionGrade.getPositionGradeName());//SimpleFieldAssign//sourceId:22944_2
                }
            }
          }
        
          }
        }//sourceId:46335_1
  

  
  
return retData;
  }

    /**
   * D1-2查询权限分配的员工列表[1595]
   * gen by moon at 10/23/2022, 12:02:41 AM
   */
  @Trace(operationName = "D1-2查询权限分配的员工列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryTributPowerMemberListRespDto queryTributPowerMemberList(QueryTributPowerMemberListReqDto reqDto){
    
      
      List<OriginalRoleMember> listOriginalRoleMember_1 =new ArrayList<>();
List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo_1 =new ArrayList<>();
List<Userinfo> listUserinfo_1 =new ArrayList<>();
//步骤0: 1-2-12查询权限分配列表 - queryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setTypeCode("PERSONAL");//sourceId:46137_1
queryTributPowerListReq.setIsArchive("FALSE");//sourceId:46392_1
queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257519_1
  
    /*1-2-12查询权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getTypeCode(),"D1-2查询权限分配的员工列表-1-2-12查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq.getIsArchive(),"D1-2查询权限分配的员工列表-1-2-12查询权限分配列表-是否存档不能为空",false);
Assert.isNull(queryTributPowerListReq.getSpaceId(),"D1-2查询权限分配的员工列表-1-2-12查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      
    
//步骤1: M-去重权限分配对象(特殊方法） - checkTributPowerObject
     //ModelCode: collectionRemoveDuplicateData
        CheckTributPowerObjectRespDto collectionRemoveDuplicateDataRes = null;
    if(listPrivacyDistribution !=null&& !CollectionUtil.isEmpty(listPrivacyDistribution)&& listPrivacyDistribution.size()>0 ){
          CheckTributPowerObjectReqDto collectionRemoveDuplicateDataReq=new CheckTributPowerObjectReqDto();
  collectionRemoveDuplicateDataReq.setTributPowerList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46154_1
  
    /*M-去重权限分配对象(特殊方法）[1582]  入参一个数据集，通过去重标识，去除数据集中重复的数据 */
    
      collectionRemoveDuplicateDataRes = nbPower.checkTributPowerObject(collectionRemoveDuplicateDataReq);
      
      
      
           }
    
//步骤2: 1-3-13批量查询就职记录列表By身份ID - batchQueryInductionRecordListByIds
     List<InductionRecord> listInductionRecord =new ArrayList<>();
    BatchQueryInductionRecordListByIdsReq batchQueryInductionRecordListByIdsReq=new BatchQueryInductionRecordListByIdsReq();
  batchQueryInductionRecordListByIdsReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:66763_1
batchQueryInductionRecordListByIdsReq.setIsTransaction("FALSE");//sourceId:66764_1
if(collectionRemoveDuplicateDataRes!=null){
      batchQueryInductionRecordListByIdsReq.setOrgStaffList(collectionRemoveDuplicateDataRes.getTributPowerList());//list-field-assign//sourceId:66761_1
    }
if(reqDto!=null){
      batchQueryInductionRecordListByIdsReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:46198_1
    }
  
    /*1-3-13批量查询就职记录列表By身份ID[1598]   */
    Assert.isNull(batchQueryInductionRecordListByIdsReq.getSubjectLifeCycle(),"D1-2查询权限分配的员工列表-1-3-13批量查询就职记录列表By身份ID-主体生命周期不能为空",false);
Assert.isNull(batchQueryInductionRecordListByIdsReq.getIsTransaction(),"D1-2查询权限分配的员工列表-1-3-13批量查询就职记录列表By身份ID-是否异动不能为空",false);
Assert.isNull(batchQueryInductionRecordListByIdsReq.getOrganizationId(),"D1-2查询权限分配的员工列表-1-3-13批量查询就职记录列表By身份ID-组织ID不能为空",false);
      listInductionRecord = mInductionRecordService.batchQueryInductionRecordListByIds(batchQueryInductionRecordListByIdsReq);
      
      
      
    
//步骤3: 1-2-09批量查询身份人员列表	 - batchQueryBeginMemberList
     List<OriginalRoleMember> listOriginalRoleMember =new ArrayList<>();
    if(listInductionRecord !=null&& !CollectionUtil.isEmpty(listInductionRecord)&& listInductionRecord.size()>0 ){
          BatchQueryBeginMemberListReq batchQueryBeginMemberListReq=new BatchQueryBeginMemberListReq();
  batchQueryBeginMemberListReq.setBeginMemberList(listInductionRecord.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46211_1
batchQueryBeginMemberListReq.setIsTransaction("FALSE");//sourceId:51050_1
batchQueryBeginMemberListReq.setIsInvalid("FALSE");//sourceId:51051_1
  
    /*1-2-09批量查询身份人员列表	[1181]   */
    
      listOriginalRoleMember = mOriginalRoleMemberService.batchQueryBeginMemberList(batchQueryBeginMemberListReq);
      
      
      listOriginalRoleMember_1 = listOriginalRoleMember;
           }
    
//步骤4: 1-2-10批量查询身份人员资料列表 - batchQueryBeginMembInfoList
     List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo =new ArrayList<>();
    if(listOriginalRoleMember !=null&& !CollectionUtil.isEmpty(listOriginalRoleMember)&& listOriginalRoleMember.size()>0 ){
          BatchQueryBeginMembInfoListReq batchQueryBeginMembInfoListReq=new BatchQueryBeginMembInfoListReq();
  batchQueryBeginMembInfoListReq.setBeginMembInfoList(listOriginalRoleMember.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46202_1
  
    /*1-2-10批量查询身份人员资料列表[1014]   */
    
      listOriginalRoleMemberInfo = mOriginalRoleMemberInfoService.batchQueryBeginMembInfoList(batchQueryBeginMembInfoListReq);
      
      
      listOriginalRoleMemberInfo_1 = listOriginalRoleMemberInfo;
           }
    
//步骤5: 1-2-02批量查询个人资料列表 - batchQueryUserinfoList
     List<Userinfo> listUserinfo =new ArrayList<>();
    if(listOriginalRoleMember !=null&& !CollectionUtil.isEmpty(listOriginalRoleMember)&& listOriginalRoleMember.size()>0 ){
          BatchQueryUserinfoListReq batchQueryUserinfoListReq=new BatchQueryUserinfoListReq();
  batchQueryUserinfoListReq.setUserList(listOriginalRoleMember.stream().map(item->item.getUserId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46203_1
  
    /*1-2-02批量查询个人资料列表[52]   */
    
      listUserinfo = mUserinfoService.batchQueryUserinfoList(batchQueryUserinfoListReq);
      
      
      listUserinfo_1 = listUserinfo;
           }
    
QueryTributPowerMemberListRespDto retData = new QueryTributPowerMemberListRespDto();
  //数据集融合  MoreListToOneSource
        if(listOriginalRoleMember_1!= null&& !CollectionUtil.isEmpty(listOriginalRoleMember_1) && !CollectionUtil.isEmpty(listOriginalRoleMember_1) ){
          for (OriginalRoleMember originalRoleMember : listOriginalRoleMember_1) {
              BeginMemberDto retElm = new BeginMemberDto();
             retElm.setOriginalRoleMemberId(originalRoleMember.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:35232_2
retElm.setUserId(originalRoleMember.getUserId());//SimpleFieldAssign//sourceId:35233_2
              retData.getBeginMemberList().add(retElm);
               if(listUserinfo_1!= null&& !CollectionUtil.isEmpty(listUserinfo_1)){
          for (Userinfo userinfo : listUserinfo_1) {
                if (userinfo.getUserId().equals(originalRoleMember.getUserId())) {
                 retElm.setUserFace(userinfo.getUserFace());//SimpleFieldAssign//sourceId:35238_2
retElm.setIdCardName(userinfo.getIdCardName());//SimpleFieldAssign//sourceId:35235_2
retElm.setNickName(userinfo.getNickName());//SimpleFieldAssign//sourceId:35236_2
                }
            }
          }
        
 if(listOriginalRoleMemberInfo_1!= null&& !CollectionUtil.isEmpty(listOriginalRoleMemberInfo_1)){
          for (OriginalRoleMemberInfo originalRoleMemberInfo : listOriginalRoleMemberInfo_1) {
                if (originalRoleMemberInfo.getOriginalRoleMemberId().equals(originalRoleMember.getOriginalRoleMemberId())) {
                 retElm.setRoleMemberCode(originalRoleMemberInfo.getRoleMemberCode());//SimpleFieldAssign//sourceId:35234_2
retElm.setPositionIdName(originalRoleMemberInfo.getPositionIdName());//SimpleFieldAssign//sourceId:35237_2
                }
            }
          }
        
          }
        }//sourceId:63303_1
  

  
  
return retData;
  }

    /**
   * D1-2查询权限分配的部门列表[1581]
   * gen by moon at 10/23/2022, 12:02:40 AM
   */
  @Trace(operationName = "D1-2查询权限分配的部门列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryTributPowerDeptListRespDto queryTributPowerDeptList(QueryTributPowerDeptListReqDto reqDto){
    
      
      List<Dept> listDept_1 =new ArrayList<>();
//步骤0: 1-2-12查询权限分配列表 - queryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setTypeCode("DEPARTMENT");//sourceId:45800_1
queryTributPowerListReq.setIsArchive("FALSE");//sourceId:46391_1
queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257518_1
  
    /*1-2-12查询权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getTypeCode(),"D1-2查询权限分配的部门列表-1-2-12查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq.getIsArchive(),"D1-2查询权限分配的部门列表-1-2-12查询权限分配列表-是否存档不能为空",false);
Assert.isNull(queryTributPowerListReq.getSpaceId(),"D1-2查询权限分配的部门列表-1-2-12查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      
    
//步骤1: M-去重权限分配对象(特殊方法） - checkTributPowerObject
     //ModelCode: collectionRemoveDuplicateData
        CheckTributPowerObjectRespDto collectionRemoveDuplicateDataRes = null;
    if(listPrivacyDistribution !=null&& !CollectionUtil.isEmpty(listPrivacyDistribution)&& listPrivacyDistribution.size()>0 ){
          CheckTributPowerObjectReqDto collectionRemoveDuplicateDataReq=new CheckTributPowerObjectReqDto();
  collectionRemoveDuplicateDataReq.setTributPowerList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:63296_1
  
    /*M-去重权限分配对象(特殊方法）[1582]  入参一个数据集，通过去重标识，去除数据集中重复的数据 */
    
      collectionRemoveDuplicateDataRes = nbPower.checkTributPowerObject(collectionRemoveDuplicateDataReq);
      
      
      
           }
    
//步骤2: 1-3-09批量查询部门列表 - batchQueryDeptList
     List<Dept> listDept =new ArrayList<>();
    BatchQueryDeptListReq batchQueryDeptListReq=new BatchQueryDeptListReq();
  batchQueryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:45838_1
if(collectionRemoveDuplicateDataRes!=null){
      batchQueryDeptListReq.setDeptList(collectionRemoveDuplicateDataRes.getTributPowerList());//list-field-assign//sourceId:45826_1
    }
if(reqDto!=null){
      batchQueryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:45829_1
    }

// TODO: 2022/10/19 晓东，分页改造
      Page<?> page = CommonFunctionHelper.startPage(reqDto.getPageNum(),reqDto.getPageSize());
    /*1-3-09批量查询部门列表[1153]   */
    Assert.isNull(batchQueryDeptListReq.getOrganizationId(),"D1-2查询权限分配的部门列表-1-3-09批量查询部门列表-组织ID不能为空",false);
Assert.isNull(batchQueryDeptListReq.getSubjectLifeCycle(),"D1-2查询权限分配的部门列表-1-3-09批量查询部门列表-主体生命周期不能为空",false);
      listDept = mDeptService.batchQueryDeptList(batchQueryDeptListReq);
      
      
      listDept_1 = listDept;
    
QueryTributPowerDeptListRespDto retData = new QueryTributPowerDeptListRespDto();
  retData.setDeptList(listDept_1.stream().map(item -> BeanUtil.toBean(item, DeptDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:63299_1

      retData.setPageNum(page.getPageNum());
      retData.setPageSize(page.getPageSize());
      retData.setTotalNum(page.getTotal());
  
  
return retData;
  }

    /**
   * D1-2存档权限[1549]
   * gen by moon at 8/10/2022, 3:17:17 AM
   */
  @Trace(operationName = "D1-2存档权限")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ArchivePowerRespDto archivePower(ArchivePowerReqDto reqDto){
    
      
      //步骤0: 1-1-06查询平台授权范围列表 - queryPlfAuthList
     List<PlatformAuthorize> listPlatformAuthorize =new ArrayList<>();
    QueryPlfAuthListReq queryPlfAuthListReq=new QueryPlfAuthListReq();
  queryPlfAuthListReq.setTypeCode("AUTH");//sourceId:44349_1
queryPlfAuthListReq.setAuthorizeTypeCode("SENCE");//sourceId:44343_1
queryPlfAuthListReq.setSubjectLifeCycle("EDITING");//sourceId:44345_1
if(reqDto!=null){
      queryPlfAuthListReq.setAuthorizedContentId(reqDto.getPrivacyId());//sourceId:44351_1
    }
  
    /*1-1-06查询平台授权范围列表（查正在编辑权限授权）[1355]   */
    Assert.isNull(queryPlfAuthListReq.getTypeCode(),"D1-2存档权限-1-1-06查询平台授权范围列表（查正在编辑权限授权）-授权内容类型编码不能为空",false);
Assert.isNull(queryPlfAuthListReq.getAuthorizeTypeCode(),"D1-2存档权限-1-1-06查询平台授权范围列表（查正在编辑权限授权）-授权对象类型编码不能为空",false);
Assert.isNull(queryPlfAuthListReq.getAuthorizedContentId(),"D1-2存档权限-1-1-06查询平台授权范围列表（查正在编辑权限授权）-授权内容ID不能为空",false);
Assert.isNull(queryPlfAuthListReq.getSubjectLifeCycle(),"D1-2存档权限-1-1-06查询平台授权范围列表（查正在编辑权限授权）-主体生命周期不能为空",false);
      listPlatformAuthorize = mPlatformAuthorizeService.queryPlfAuthList(queryPlfAuthListReq);
      
      
    
//步骤1: 1-1-06批量删除平台授权范围 - batchDeletePlfAuth
     boolean bOOLEAN ;
    if(listPlatformAuthorize!=null && listPlatformAuthorize.size()>0 ){
          List<String> listString=new ArrayList<>();
  listString = listPlatformAuthorize.stream().map(item->item.getPlatformAuthorizeId())
        .collect(Collectors.toList());//sourceId:44456_1
  
    /*1-1-06批量删除平台授权范围[1551]   */
    
      bOOLEAN = mPlatformAuthorizeService.batchDeletePlfAuth(listString);
      
      
           }
    
//步骤2: 1-1-06查询平台授权范围列表 - queryPlfAuthList
     List<PlatformAuthorize> listPlatformAuthorize_2 =new ArrayList<>();
    QueryPlfAuthListReq queryPlfAuthListReq_1=new QueryPlfAuthListReq();
  queryPlfAuthListReq_1.setTypeCode("AUTH");//sourceId:44338_1
queryPlfAuthListReq_1.setAuthorizeTypeCode("SENCE");//sourceId:44332_1
queryPlfAuthListReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:44342_1
if(reqDto!=null){
      queryPlfAuthListReq_1.setAuthorizedContentId(reqDto.getPrivacyId());//sourceId:44341_1
    }
  
    /*1-1-06查询平台授权范围列表（查权限有效授权）[1355]   */
    Assert.isNull(queryPlfAuthListReq_1.getTypeCode(),"D1-2存档权限-1-1-06查询平台授权范围列表（查权限有效授权）-授权内容类型编码不能为空",false);
Assert.isNull(queryPlfAuthListReq_1.getAuthorizeTypeCode(),"D1-2存档权限-1-1-06查询平台授权范围列表（查权限有效授权）-授权对象类型编码不能为空",false);
Assert.isNull(queryPlfAuthListReq_1.getAuthorizedContentId(),"D1-2存档权限-1-1-06查询平台授权范围列表（查权限有效授权）-授权内容ID不能为空",false);
Assert.isNull(queryPlfAuthListReq_1.getSubjectLifeCycle(),"D1-2存档权限-1-1-06查询平台授权范围列表（查权限有效授权）-主体生命周期不能为空",false);
      listPlatformAuthorize_2 = mPlatformAuthorizeService.queryPlfAuthList(queryPlfAuthListReq_1);
      
      
    
//步骤3: 1-1-06批量修改平台授权范围 - batchUpdatePlfAuth
     boolean bOOLEAN_1 ;
    if(listPlatformAuthorize_2!=null && listPlatformAuthorize_2.size()>0 ){
          List<PlatformAuthorize> listPlatformAuthorize_4=new ArrayList<>();
  for (PlatformAuthorize item : listPlatformAuthorize_2) {
                PlatformAuthorize oneItem = new PlatformAuthorize();
                oneItem.setPlatformAuthorizeId(item.getPlatformAuthorizeId());//sourceId:20935_2
oneItem.setSubjectLifeCycle("ARCHIVING");//sourceId:53169_2
oneItem.setIsArchive("TRUE");//sourceId:53170_2
               
                listPlatformAuthorize_4.add(oneItem);
            }//sourceId:44513_1
  
    /*1-1-06批量修改平台授权范围（存档）[1550]   */
    
      bOOLEAN_1 = mPlatformAuthorizeService.batchUpdatePlfAuth(listPlatformAuthorize_4);
      
      
           }
    
//步骤4: 1-2-11修改权限 - updatePower
     boolean bOOLEAN_2 ;
    Privacy privacy=new Privacy();
  privacy.setSubjectLifeCycle("ARCHIVING");//sourceId:44586_1
privacy.setIsArchive("TRUE");//sourceId:44590_1
if(privacy!=null && privacy.getSubjectLifeCycle()!=null && privacy.getSubjectLifeCycle().equals("ARCHIVING")) {
              privacy.setArchiveInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//ARCHIVE_CURRENT_INDUCTIONID
          }//sourceId:44602_1
if(privacy!=null && privacy.getSubjectLifeCycle()!=null && privacy.getSubjectLifeCycle().equals("ARCHIVING")) {
              privacy.setArchiveTime(CommonFunctionHelper.getCurrentTime());//HISTORICAL_ARCHIVING
          }//sourceId:44603_1
if(reqDto!=null){
      privacy.setPrivacyId(reqDto.getPrivacyId());//sourceId:44580_1
    }
  
    /*1-2-11修改权限（存档）[118]   */
    Assert.isNull(privacy.getPrivacyId(),"D1-2存档权限-1-2-11修改权限（存档）-权限ID不能为空",false);
Assert.isNull(privacy.getSubjectLifeCycle(),"D1-2存档权限-1-2-11修改权限（存档）-主体生命周期不能为空",false);
Assert.isNull(privacy.getIsArchive(),"D1-2存档权限-1-2-11修改权限（存档）-是否存档不能为空",false);
Assert.isNull(privacy.getArchiveInductionId(),"D1-2存档权限-1-2-11修改权限（存档）-存档人就职记录ID不能为空",false);
Assert.isNull(privacy.getArchiveTime(),"D1-2存档权限-1-2-11修改权限（存档）-存档时间不能为空",false);
      bOOLEAN_2 = mPrivacyService.updatePower(privacy);
      
      
    
ArchivePowerRespDto retData = new ArchivePowerRespDto();
  
  

  
  
return retData;
  }

    /**
   * D1-2新增权限分配[1067]
   * gen by moon at 5/7/2023, 7:19:43 PM
   */
  @Trace(operationName = "D1-2新增权限分配")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public AddTributPowerRespDto addTributPower(AddTributPowerReqDto reqDto){
    
      
      String string_1 =null;
//virtualUsage 1-2-12查询权限分配详情（查权限是否已分配）  1234
      PrivacyDistribution privacyDistribution = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq=new QueryTributPowerDetailReq();
  queryTributPowerDetailReq.setIsArchive("FALSE");//sourceId:313700_1_1234
queryTributPowerDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257802_1_1234
if(reqDto!=null){
      queryTributPowerDetailReq.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:45450_1_1234
queryTributPowerDetailReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:45464_1_1234
queryTributPowerDetailReq.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:45465_1_1234
    }
  
    /*1-2-12查询权限分配详情（查权限是否已分配）[498]   */
    Assert.isNull(queryTributPowerDetailReq.getPrivacyId(),"D1-2新增权限分配-1-2-12查询权限分配详情（查权限是否已分配）-权限ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getTypeCode(),"D1-2新增权限分配-1-2-12查询权限分配详情（查权限是否已分配）-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getAllocationObjectId(),"D1-2新增权限分配-1-2-12查询权限分配详情（查权限是否已分配）-分配对象ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getIsArchive(),"D1-2新增权限分配-1-2-12查询权限分配详情（查权限是否已分配）-是否存档不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getSpaceId(),"D1-2新增权限分配-1-2-12查询权限分配详情（查权限是否已分配）-创建于空间ID不能为空",false);
      privacyDistribution = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq)/*vcase invoke 本地 method 方法调用;*/;
      
      
      
if((privacyDistribution == null )) {
        //if(1-2-12查询权限分配详情（查权限是否已分配）.出参 等于空 )  1235
        
Privacy privacy = null;
    QueryPowerDetailReq queryPowerDetailReq=new QueryPowerDetailReq();
  if(reqDto!=null){
      queryPowerDetailReq.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:259641_1_14760
    }
  
    /*1-2-11查询权限详情[120]   */
    Assert.isNull(queryPowerDetailReq.getPrivacyId(),"D1-2新增权限分配-1-2-11查询权限详情-权限ID不能为空",false);
      privacy = mPrivacyService.queryPowerDetail(queryPowerDetailReq)/*vcase invoke 本地 method 方法调用;*/;
      
      
      
String string = null;
    if(privacy !=null){
          PrivacyDistribution privacyDistribution_2=new PrivacyDistribution();
  privacyDistribution_2.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257803_1_1239
privacyDistribution_2.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:257804_1_1239
if(reqDto!=null){
      privacyDistribution_2.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:45404_1_1239
privacyDistribution_2.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:45406_1_1239
privacyDistribution_2.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:45407_1_1239
privacyDistribution_2.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:64270_1_1239
privacyDistribution_2.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:45408_1_1239
    }
if(privacy!=null){
      privacyDistribution_2.setPrivacyCode(privacy.getPrivacyCode());//SimpleFieldAssign//sourceId:45405_1_1239
privacyDistribution_2.setIsportPrivacy(privacy.getIsportPrivacy());//SimpleFieldAssign//sourceId:64265_1_1239
privacyDistribution_2.setPrivacyRoute(privacy.getPrivacyRoute());//SimpleFieldAssign//sourceId:64266_1_1239
privacyDistribution_2.setIsDataPrivacy(privacy.getIsDataPrivacy());//SimpleFieldAssign//sourceId:64267_1_1239
privacyDistribution_2.setDataModel(privacy.getDataModel());//SimpleFieldAssign//sourceId:64268_1_1239
privacyDistribution_2.setPrivacyCategory(privacy.getPrivacyCategory());//SimpleFieldAssign//sourceId:64269_1_1239
    }
  
    /*1-2-12新增权限分配[473]   */
    Assert.isNull(privacyDistribution_2.getPrivacyId(),"D1-2新增权限分配-1-2-12新增权限分配-权限ID不能为空",false);
Assert.isNull(privacyDistribution_2.getPrivacyCode(),"D1-2新增权限分配-1-2-12新增权限分配-权限标识不能为空",false);
Assert.isNull(privacyDistribution_2.getTypeCode(),"D1-2新增权限分配-1-2-12新增权限分配-分配对象类型编码不能为空",false);
Assert.isNull(privacyDistribution_2.getAllocationObjectId(),"D1-2新增权限分配-1-2-12新增权限分配-分配对象ID不能为空",false);
Assert.isNull(privacyDistribution_2.getIsportPrivacy(),"D1-2新增权限分配-1-2-12新增权限分配-是否接口权限不能为空",false);
Assert.isNull(privacyDistribution_2.getIsDataPrivacy(),"D1-2新增权限分配-1-2-12新增权限分配-是否数据权限不能为空",false);
Assert.isNull(privacyDistribution_2.getSubjectLifeCycle(),"D1-2新增权限分配-1-2-12新增权限分配-主体生命周期不能为空",false);
Assert.isNull(privacyDistribution_2.getSpaceId(),"D1-2新增权限分配-1-2-12新增权限分配-创建于空间ID不能为空",false);
Assert.isNull(privacyDistribution_2.getAppId(),"D1-2新增权限分配-1-2-12新增权限分配-创建于联盟应用ID不能为空",false);
      string = mPrivacyDistributionService.addTributPower(privacyDistribution_2)/*vcase invoke 本地 method 方法调用;*/;
      
      
      string_1 = string;
           }
//processBranchName:正常结束 ,processBranchId:1240
        
      }
else{
       //else  1237
      
//异常结束 1238
      throw new BizException("10200023","对不起，权限已分配，请重新选择～！",false);
    }
AddTributPowerRespDto retData = new AddTributPowerRespDto();
  if(string_1!=null){
      retData.setPrivacyDistributionId(string_1);//SimpleFieldAssign//sourceId:45417_1
    }
  

  
  
return retData;
  }

    /**
   * D1-2删除权限[565]
   * gen by moon at 11/8/2022, 7:38:30 PM
   */
  @Trace(operationName = "D1-2删除权限")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public DeletePowerRespDto deletePower(DeletePowerReqDto reqDto){


      //步骤0: 1-2-11查询权限详情 - queryPowerDetail
     Privacy privacy = null;
    QueryPowerDetailReq queryPowerDetailReq=new QueryPowerDetailReq();
  queryPowerDetailReq.setSubjectLifeCycle("EDITING");//sourceId:425802_1
if(reqDto!=null){
      queryPowerDetailReq.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:425778_1
    }

    /*1-2-11查询权限详情[120]   */
    Assert.isNull(queryPowerDetailReq.getPrivacyId(),"D1-2删除权限-1-2-11查询权限详情-权限ID不能为空",false);
Assert.isNull(queryPowerDetailReq.getSubjectLifeCycle(),"D1-2删除权限-1-2-11查询权限详情-主体生命周期不能为空",false);
      privacy = mPrivacyService.queryPowerDetail(queryPowerDetailReq);
      Assert.isTrue(privacy== null||  privacy.getPrivacyId() ==null,"返回值不能为空",false);



//步骤1: 1-2-11删除权限 - deletePower
     boolean bOOLEAN ;
    String string=new String();
  if(reqDto!=null){
      string=reqDto.getPrivacyId();;//SimpleFieldAssign//sourceId:8073_1
    }

    /*1-2-11删除权限[119]   */
    Assert.isNull(string,"D1-2删除权限-1-2-11删除权限-权限ID不能为空",false);
      bOOLEAN = mPrivacyService.deletePower(string);




DeletePowerRespDto retData = new DeletePowerRespDto();





return retData;
  }

    /**
   * D1-2新增权限(平台)[561]
   * gen by moon at 12/9/2022, 2:14:41 PM
   */
  @Trace(operationName = "D1-2新增权限(平台)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public AddPowerRespDto addPower(AddPowerReqDto reqDto){
    
      
      String string_1 =null;
if((reqDto!= null&&  reqDto.getIsDataPrivacy() !=null && reqDto.getIsDataPrivacy().equals("TRUE"))&&(reqDto!= null&& reqDto.getDataModel() == null ||reqDto!= null&& reqDto.getPrivacyCategory() == null ||reqDto!= null&& reqDto.getBusinessPurposes() == null )) {
        //if(D1-2新增权限(平台).是否数据权限 等于 是 and (D1-2新增权限(平台).数据父模型编码 值等于空  or D1-2新增权限(平台).权限类别 值等于空  or D1-2新增权限(平台).权限业务用途 值等于空 ))  21338

//异常结束 21377
      throw new BizException("C00007","对不起，有错误，不可新增～！",false);
      }
else{
       //else  21378

String string = null;
    Privacy privacy=new Privacy();
  if(reqDto!=null){
      privacy.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:8053_1_21379
privacy.setPrivacyName(reqDto.getPrivacyName());//SimpleFieldAssign//sourceId:8037_1_21379
privacy.setPrivacyIntroduce(reqDto.getPrivacyIntroduce());//SimpleFieldAssign//sourceId:8038_1_21379
privacy.setPrivacyLogo(reqDto.getPrivacyLogo());//SimpleFieldAssign//sourceId:8039_1_21379
privacy.setPrivacyType(reqDto.getPrivacyType());//SimpleFieldAssign//sourceId:8040_1_21379
privacy.setStrategyType(reqDto.getStrategyType());//SimpleFieldAssign//sourceId:11436_1_21379
privacy.setIsportPrivacy(reqDto.getIsportPrivacy());//SimpleFieldAssign//sourceId:43832_1_21379
privacy.setPrivacyRoute(reqDto.getPrivacyRoute());//SimpleFieldAssign//sourceId:34950_1_21379
privacy.setIsDataPrivacy(reqDto.getIsDataPrivacy());//SimpleFieldAssign//sourceId:43833_1_21379
privacy.setDataModel(reqDto.getDataModel());//SimpleFieldAssign//sourceId:34897_1_21379
privacy.setPrivacyCategory(reqDto.getPrivacyCategory());//SimpleFieldAssign//sourceId:43834_1_21379
privacy.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:43835_1_21379
privacy.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:8045_1_21379
    }
  
    /*1-2-11新增权限[117]   */
    Assert.isNull(privacy.getPrivacyCode(),"D1-2新增权限(平台)-1-2-11新增权限-权限标识不能为空",false);
Assert.isNull(privacy.getPrivacyName(),"D1-2新增权限(平台)-1-2-11新增权限-权限名称不能为空",false);
Assert.isNull(privacy.getPrivacyType(),"D1-2新增权限(平台)-1-2-11新增权限-权限类型不能为空",false);
Assert.isNull(privacy.getStrategyType(),"D1-2新增权限(平台)-1-2-11新增权限-分配策略不能为空",false);
Assert.isNull(privacy.getIsportPrivacy(),"D1-2新增权限(平台)-1-2-11新增权限-是否接口权限不能为空",false);
Assert.isNull(privacy.getIsDataPrivacy(),"D1-2新增权限(平台)-1-2-11新增权限-是否数据权限不能为空",false);
Assert.isNull(privacy.getSubjectLifeCycle(),"D1-2新增权限(平台)-1-2-11新增权限-主体生命周期不能为空",false);
      string = mPrivacyService.addPower(privacy);
      

      string_1 = string;
    }
AddPowerRespDto retData = new AddPowerRespDto();
  if(string_1!=null){
      retData.setPrivacyId(string_1);//SimpleFieldAssign//sourceId:11417_1
    }
  

  
  
return retData;
  }

    /**
   * D1-2查询权限详情[559]
   * gen by moon at 10/2/2022, 7:42:40 AM
   */
  @Trace(operationName = "D1-2查询权限详情")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryPowerDetailRespDto queryPowerDetail(QueryPowerDetailReqDto reqDto){
    
      
      Privacy privacy_1 =null;
//步骤0: 1-2-11查询权限详情 - queryPowerDetail
     Privacy privacy = null;
    QueryPowerDetailReq queryPowerDetailReq=new QueryPowerDetailReq();
  if(reqDto!=null){
      queryPowerDetailReq.setPrivacyId(reqDto.getPrivacyId());//SimpleFieldAssign//sourceId:8009_1
queryPowerDetailReq.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:8035_1
queryPowerDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:44282_1
    }
  
    /*1-2-11查询权限详情[120]   */
    
      privacy = mPrivacyService.queryPowerDetail(queryPowerDetailReq);
      
      
      privacy_1 = privacy;
    
QueryPowerDetailRespDto retData = new QueryPowerDetailRespDto();
  if(privacy_1!=null){
      retData.setPrivacyId(privacy_1.getPrivacyId());//SimpleFieldAssign//sourceId:25941_1
retData.setPrivacyCode(privacy_1.getPrivacyCode());//SimpleFieldAssign//sourceId:25942_1
retData.setPrivacyName(privacy_1.getPrivacyName());//SimpleFieldAssign//sourceId:25943_1
retData.setPrivacyIntroduce(privacy_1.getPrivacyIntroduce());//SimpleFieldAssign//sourceId:25944_1
retData.setPrivacyLogo(privacy_1.getPrivacyLogo());//SimpleFieldAssign//sourceId:25945_1
retData.setPrivacyType(privacy_1.getPrivacyType());//SimpleFieldAssign//sourceId:25946_1
retData.setStrategyType(privacy_1.getStrategyType());//SimpleFieldAssign//sourceId:25947_1
retData.setIsportPrivacy(privacy_1.getIsportPrivacy());//SimpleFieldAssign//sourceId:44190_1
retData.setPrivacyRoute(privacy_1.getPrivacyRoute());//SimpleFieldAssign//sourceId:25948_1
retData.setIsDataPrivacy(privacy_1.getIsDataPrivacy());//SimpleFieldAssign//sourceId:44191_1
retData.setDataModel(privacy_1.getDataModel());//SimpleFieldAssign//sourceId:25949_1
retData.setPrivacyCategory(privacy_1.getPrivacyCategory());//SimpleFieldAssign//sourceId:44192_1
retData.setBusinessPurposes(privacy_1.getBusinessPurposes());//SimpleFieldAssign//sourceId:44193_1
retData.setSubjectLifeCycle(privacy_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:25950_1
retData.setIsArchive(privacy_1.getIsArchive());//SimpleFieldAssign//sourceId:34780_1
retData.setOperationInductionId(privacy_1.getOperationInductionId());//SimpleFieldAssign//sourceId:26091_1
retData.setOperateTime(privacy_1.getOperateTime());//SimpleFieldAssign//sourceId:34779_1
    }
  

  
  
return retData;
  }

    /**
   * D1-2查询权限分配的成员列表[1603]
   * gen by moon at 10/2/2022, 12:14:53 AM
   */
  @Trace(operationName = "D1-2查询权限分配的成员列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  @BanAuto
  public QueryTributPowerInductionRecordListRespDto queryTributPowerInductionRecordList(QueryTributPowerInductionRecordListReqDto reqDto){
    
      
      List<InductionRecord> listInductionRecord_1 =new ArrayList<>();
List<OriginalRoleMember> listOriginalRoleMember_1 =new ArrayList<>();
List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo_1 =new ArrayList<>();
List<Userinfo> listUserinfo_1 =new ArrayList<>();
//步骤0: 1-2-12查询权限分配列表 - queryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryTributPowerListReq queryTributPowerListReq=new QueryTributPowerListReq();
  queryTributPowerListReq.setTypeCode("PERSONAL_DEPARTMENT");//sourceId:46411_1
queryTributPowerListReq.setIsArchive("FALSE");//sourceId:46412_1
queryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:257787_1
  
    /*1-2-12查询权限分配列表[497]   */
    Assert.isNull(queryTributPowerListReq.getTypeCode(),"D1-2查询权限分配的成员列表-1-2-12查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerListReq.getIsArchive(),"D1-2查询权限分配的成员列表-1-2-12查询权限分配列表-是否存档不能为空",false);
Assert.isNull(queryTributPowerListReq.getSpaceId(),"D1-2查询权限分配的成员列表-1-2-12查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryTributPowerList(queryTributPowerListReq);
      
      
      
    
//步骤1: M-去重权限分配对象(特殊方法） - checkTributPowerObject
     //ModelCode: collectionRemoveDuplicateData
        CheckTributPowerObjectRespDto collectionRemoveDuplicateDataRes = null;
    if(listPrivacyDistribution !=null&& listPrivacyDistribution.size()>0 ){
          CheckTributPowerObjectReqDto collectionRemoveDuplicateDataReq=new CheckTributPowerObjectReqDto();
  collectionRemoveDuplicateDataReq.setTributPowerList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:63315_1
  
    /*M-去重权限分配对象(特殊方法）[1582]  入参一个数据集，通过去重标识，去除数据集中重复的数据 */
    
      collectionRemoveDuplicateDataRes = nbPower.checkTributPowerObject(collectionRemoveDuplicateDataReq);
      
      
      
           }

      // TODO: 2022/9/9  晓东，分页改造
      Page<?> page = CommonFunctionHelper.startPage(reqDto.getPageNum(),reqDto.getPageSize());
    
//步骤2: 1-3-13批量查询就职记录列表 - batchQueryInductionRecordList
     List<InductionRecord> listInductionRecord =new ArrayList<>();
    BatchQueryInductionRecordListReq batchQueryInductionRecordListReq=new BatchQueryInductionRecordListReq();
  batchQueryInductionRecordListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46470_1
batchQueryInductionRecordListReq.setIsTransaction("FALSE");//sourceId:51053_1
if(collectionRemoveDuplicateDataRes!=null){
      //list-field-assign
    batchQueryInductionRecordListReq.setPerOrgInductionRecordList(collectionRemoveDuplicateDataRes.getTributPowerList());//sourceId:46416_1
    }
if(reqDto!=null){
      batchQueryInductionRecordListReq.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:46469_1
    }
  
    /*1-3-13批量查询就职记录列表[601]   */
    Assert.isNull(batchQueryInductionRecordListReq.getEntityId(),"D1-2查询权限分配的成员列表-1-3-13批量查询就职记录列表-就职单位对象实例ID不能为空",false);
Assert.isNull(batchQueryInductionRecordListReq.getSubjectLifeCycle(),"D1-2查询权限分配的成员列表-1-3-13批量查询就职记录列表-主体生命周期不能为空",false);
Assert.isNull(batchQueryInductionRecordListReq.getIsTransaction(),"D1-2查询权限分配的成员列表-1-3-13批量查询就职记录列表-是否异动不能为空",false);
      listInductionRecord = mInductionRecordService.batchQueryInductionRecordList(batchQueryInductionRecordListReq);
      
      
      listInductionRecord_1 = listInductionRecord;
    
//步骤3: 1-2-09批量查询身份人员列表	 - batchQueryBeginMemberList
     List<OriginalRoleMember> listOriginalRoleMember =new ArrayList<>();
    if(listInductionRecord !=null&& listInductionRecord.size()>0 ){
          BatchQueryBeginMemberListReq batchQueryBeginMemberListReq=new BatchQueryBeginMemberListReq();
  batchQueryBeginMemberListReq.setBeginMemberList(listInductionRecord.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46474_1
batchQueryBeginMemberListReq.setIsTransaction("FALSE");//sourceId:51054_1
batchQueryBeginMemberListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:46478_1
batchQueryBeginMemberListReq.setIsInvalid("FALSE");//sourceId:51055_1
  
    /*1-2-09批量查询身份人员列表	[1181]   */
    Assert.isNull(batchQueryBeginMemberListReq.getIsTransaction(),"D1-2查询权限分配的成员列表-1-2-09批量查询身份人员列表	-是否异动不能为空",false);
Assert.isNull(batchQueryBeginMemberListReq.getSubjectLifeCycle(),"D1-2查询权限分配的成员列表-1-2-09批量查询身份人员列表	-主体生命周期不能为空",false);
Assert.isNull(batchQueryBeginMemberListReq.getIsInvalid(),"D1-2查询权限分配的成员列表-1-2-09批量查询身份人员列表	-是否失效不能为空",false);
      listOriginalRoleMember = mOriginalRoleMemberService.batchQueryBeginMemberList(batchQueryBeginMemberListReq);
      
      
      listOriginalRoleMember_1 = listOriginalRoleMember;
           }
    
//步骤4: 1-2-10批量查询身份人员资料列表 - batchQueryBeginMembInfoList
     List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo =new ArrayList<>();
    if(listOriginalRoleMember !=null&& listOriginalRoleMember.size()>0 ){
          BatchQueryBeginMembInfoListReq batchQueryBeginMembInfoListReq=new BatchQueryBeginMembInfoListReq();
  batchQueryBeginMembInfoListReq.setBeginMembInfoList(listOriginalRoleMember.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46473_1
  
    /*1-2-10批量查询身份人员资料列表[1014]   */
    
      listOriginalRoleMemberInfo = mOriginalRoleMemberInfoService.batchQueryBeginMembInfoList(batchQueryBeginMembInfoListReq);
      
      
      listOriginalRoleMemberInfo_1 = listOriginalRoleMemberInfo;
           }
    
//步骤5: 1-2-02批量查询个人资料列表 - batchQueryUserinfoList
     List<Userinfo> listUserinfo =new ArrayList<>();
    if(listOriginalRoleMember !=null&& listOriginalRoleMember.size()>0 ){
          BatchQueryUserinfoListReq batchQueryUserinfoListReq=new BatchQueryUserinfoListReq();
  batchQueryUserinfoListReq.setUserList(listOriginalRoleMember.stream().map(item->item.getUserId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:46482_1
  
    /*1-2-02批量查询个人资料列表[52]   */
    
      listUserinfo = mUserinfoService.batchQueryUserinfoList(batchQueryUserinfoListReq);
      
      
      listUserinfo_1 = listUserinfo;
           }
    
QueryTributPowerInductionRecordListRespDto retData = new QueryTributPowerInductionRecordListRespDto();
  //数据集融合  MoreListToOneSource
        if(listInductionRecord_1!= null && !CollectionUtil.isEmpty(listInductionRecord_1) ){
          for (InductionRecord inductionRecord : listInductionRecord_1) {
              PerOrgInductionRecordDto retElm = new PerOrgInductionRecordDto();
             retElm.setInductionRecordId(inductionRecord.getInductionRecordId());//SimpleFieldAssign//sourceId:35293_2
              retData.getPerOrgInductionRecordList().add(retElm);
               if(listOriginalRoleMemberInfo_1!= null){
          for (OriginalRoleMemberInfo originalRoleMemberInfo : listOriginalRoleMemberInfo_1) {
                if (originalRoleMemberInfo.getOriginalRoleMemberId().equals(inductionRecord.getOriginalRoleMemberId())) {
                 retElm.setRoleMemberCode(originalRoleMemberInfo.getRoleMemberCode());//SimpleFieldAssign//sourceId:35297_2
retElm.setPositionIdName(originalRoleMemberInfo.getPositionIdName());//SimpleFieldAssign//sourceId:35300_2
                }
            }
          }
        
 if(listUserinfo_1!= null){
          for (Userinfo userinfo : listUserinfo_1) {
                if (userinfo.getUserId().equals(inductionRecord.getUserId())) {
                 retElm.setUserId(userinfo.getUserId());//SimpleFieldAssign//sourceId:35296_2
retElm.setUserFace(userinfo.getUserFace());//SimpleFieldAssign//sourceId:35301_2
retElm.setIdCardName(userinfo.getIdCardName());//SimpleFieldAssign//sourceId:35298_2
retElm.setNickName(userinfo.getNickName());//SimpleFieldAssign//sourceId:35299_2
                }
            }
          }
        
          }
        }//sourceId:63317_1


      retData.setPageNum(page.getPageNum());
      retData.setPageSize(page.getPageSize());
      retData.setTotalNum(page.getTotal());
  
return retData;
  }

    /**
   * D1-2批量查询权限分配(公共)（跨服务）[703]
   * gen by moon at 5/10/2023, 6:51:54 PM
   */
  @Trace(operationName = "D1-2批量查询权限分配(公共)（跨服务）")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchQueryTributPowerComRespDto batchQueryTributPowerCom(BatchQueryTributPowerComReqDto reqDto){
    
      
      List<PrivacyDistribution> listPrivacyDistribution_1 =new ArrayList<>();
//步骤0: 1-2-12批量查询权限分配列表 - batchQueryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    BatchQueryTributPowerListReq batchQueryTributPowerListReq=new BatchQueryTributPowerListReq();
  if(reqDto!=null){
      batchQueryTributPowerListReq.setTributPowerList(reqDto.getTributPowerList());//list-field-assign//sourceId:14228_1
      batchQueryTributPowerListReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:14230_1
batchQueryTributPowerListReq.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:64280_1
batchQueryTributPowerListReq.setIsDataPrivacy(reqDto.getIsDataPrivacy());//SimpleFieldAssign//sourceId:64281_1
batchQueryTributPowerListReq.setDataModel(reqDto.getDataModel());//SimpleFieldAssign//sourceId:64324_1
batchQueryTributPowerListReq.setPrivacyCategory(reqDto.getPrivacyCategory());//SimpleFieldAssign//sourceId:64282_1
batchQueryTributPowerListReq.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:906441_1
batchQueryTributPowerListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:64283_1
    }
  
    /*1-2-12批量查询权限分配列表[702]   */
    
      listPrivacyDistribution = mPrivacyDistributionService.batchQueryTributPowerList(batchQueryTributPowerListReq)/*vcase invoke 本地 method 方法调用;*/;
      
      
      listPrivacyDistribution_1 = listPrivacyDistribution;
    
BatchQueryTributPowerComRespDto retData = new BatchQueryTributPowerComRespDto();
  retData.setTributPowerList(listPrivacyDistribution_1.stream().map(item -> BeanUtil.toBean(item, TributPowerDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:14233_1
  

  
  
return retData;
  }
/**
   * D1判断组织架构唯一权限(公共)[3877]
   * gen by moon at 12/10/2024, 12:03:57 AM
   */
  @Trace(operationName = "D1判断组织架构唯一权限(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public JudgeOrgOnlyPowerComRespDto judgeOrgOnlyPowerCom(JudgeOrgOnlyPowerComReqDto reqDto){
    
      
      JudgeOrgStructureMgtUsableComRespDto judgeOrgStructureMgtUsableComRespDto_1 =null;
QueryReceiveFieldDetailRespDto receptionServiceRes_3 =null;
//virtualUsage D1查询当前用户指定角色权限(公共)  12411
      QueryCurrentUserRolePowerDetailComRespDto queryCurrentUserRolePowerDetailComRespDto = null;
    QueryCurrentUserRolePowerDetailComReqDto queryCurrentUserRolePowerDetailComReqDto=new QueryCurrentUserRolePowerDetailComReqDto();
  if(reqDto!=null){
      queryCurrentUserRolePowerDetailComReqDto.setRoleCode(reqDto.getRoleCode());//SimpleFieldAssign//sourceId:194349_1_12411
queryCurrentUserRolePowerDetailComReqDto.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:194350_1_12411
    }
  
    /*D1查询当前用户指定角色权限(公共)[3831]   */
    Assert.isNull(queryCurrentUserRolePowerDetailComReqDto.getRoleCode(),"D1判断组织架构唯一权限(公共)-D1查询当前用户指定角色权限(公共)-角色标识不能为空",false);
Assert.isNull(queryCurrentUserRolePowerDetailComReqDto.getPrivacyCode(),"D1判断组织架构唯一权限(公共)-D1查询当前用户指定角色权限(公共)-权限标识不能为空",false);
      queryCurrentUserRolePowerDetailComRespDto = queryCurrentUserRolePowerDetailCom(queryCurrentUserRolePowerDetailComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      
if((queryCurrentUserRolePowerDetailComRespDto!= null&& queryCurrentUserRolePowerDetailComRespDto.getOutputNum() == 1L)) {
        //if(D1查询当前用户指定角色权限(公共).输出数值 等于 1)  12412
        
JudgeOrgStructureMgtUsableComRespDto judgeOrgStructureMgtUsableComRespDto = null;
    JudgeOrgStructureMgtUsableComReqDto judgeOrgStructureMgtUsableComReqDto=new JudgeOrgStructureMgtUsableComReqDto();
  if(reqDto!=null){
      judgeOrgStructureMgtUsableComReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:194337_1_12413
    }
  
    /*D1判断组织架构进入管理可用(公共)[3813]   */
    Assert.isNull(judgeOrgStructureMgtUsableComReqDto.getOrganizationId(),"D1判断组织架构唯一权限(公共)-D1判断组织架构进入管理可用(公共)-组织ID不能为空",false);
      judgeOrgStructureMgtUsableComRespDto = batchService.judgeOrgStructureMgtUsableCom(judgeOrgStructureMgtUsableComReqDto)/*vcase invoke isSameApp*/;
      
      
      judgeOrgStructureMgtUsableComRespDto_1 = judgeOrgStructureMgtUsableComRespDto;
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes = null;
    QueryReceiveFieldDetailReqDto receptionServiceReq=new QueryReceiveFieldDetailReqDto();
  if(reqDto!=null){
      receptionServiceReq.setBatchMgtOperationType(reqDto.getBatchMgtOperationType());//SimpleFieldAssign//sourceId:199930_1_12707
    }
  
    /*M1-确定哪一个管理操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq.getBatchMgtOperationType(),"D1判断组织架构唯一权限(公共)-M1-确定哪一个管理操作-批次下管理操作类型不能为空",false);
      receptionServiceRes = nbPower.queryReceiveFieldDetail(receptionServiceReq);
      
      
      
if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("START_MGT_OBJ")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getStartMgtObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getStartMgtObj() !=null && judgeOrgStructureMgtUsableComRespDto.getStartMgtObj().equals("1"))) {
        //if((M1-确定哪一个管理操作.批次下管理操作类型 等于 开始管理 and D1判断组织架构进入管理可用(公共).开始管理 值不等于空  and D1判断组织架构进入管理可用(公共).开始管理 等于 1))  12414
        
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_1=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_1.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getStartMgtObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getStartMgtObj()):null);//SimpleFieldAssign//sourceId:246730_1_12415
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_1.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_2 = nbPower.queryReceiveFieldDetail(receptionServiceReq_1);
      
      
      receptionServiceRes_3 = receptionServiceRes_2;
           }
//processBranchName:正常结束 ,processBranchId:12416
        
      }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("0")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getSetCompleteObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getCancelSetCompleteObj() !=null && judgeOrgStructureMgtUsableComRespDto.getCancelSetCompleteObj().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 0开始管理 and D1判断组织架构进入管理可用(公共).确认设置完成 值不等于空  and D1判断组织架构进入管理可用(公共).取消设置完成 等于 1))  12459
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_4 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_2=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_2.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getSetCompleteObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getSetCompleteObj()):null);//SimpleFieldAssign//sourceId:246730_1_12461
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_2.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_4 = nbPower.queryReceiveFieldDetail(receptionServiceReq_2);
      
      
      receptionServiceRes_3 = receptionServiceRes_4;
           }
//processBranchName:正常结束 ,processBranchId:12462
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("0")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getCancelSetCompleteObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getCancelSetCompleteObj() !=null && judgeOrgStructureMgtUsableComRespDto.getCancelSetCompleteObj().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 0开始管理 and D1判断组织架构进入管理可用(公共).取消设置完成 值不等于空  and D1判断组织架构进入管理可用(公共).取消设置完成 等于 1))  12460
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_5 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_3=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_3.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getCancelSetCompleteObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getCancelSetCompleteObj()):null);//SimpleFieldAssign//sourceId:246730_1_12463
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_3.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_5 = nbPower.queryReceiveFieldDetail(receptionServiceReq_3);
      
      
      receptionServiceRes_3 = receptionServiceRes_5;
           }
//processBranchName:正常结束 ,processBranchId:12464
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("RELEASE_EFFECT_OBJ")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getReleaseEffectObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getReleaseEffectObj() !=null && judgeOrgStructureMgtUsableComRespDto.getReleaseEffectObj().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 发布生效 and D1判断组织架构进入管理可用(公共).发布生效 值不等于空  and D1判断组织架构进入管理可用(公共).发布生效 等于 1))  12708
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_6 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_4=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_4.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getReleaseEffectObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getReleaseEffectObj()):null);//SimpleFieldAssign//sourceId:246730_1_12709
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_4.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_6 = nbPower.queryReceiveFieldDetail(receptionServiceReq_4);
      
      
      receptionServiceRes_3 = receptionServiceRes_6;
           }
//processBranchName:正常结束 ,processBranchId:12710
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("CANCEL_REVISION_OBJ")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getCancelRevisionObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getCancelRevisionObj() !=null && judgeOrgStructureMgtUsableComRespDto.getCancelRevisionObj().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 撤销修订 and D1判断组织架构进入管理可用(公共).撤销修订 值不等于空  and D1判断组织架构进入管理可用(公共).撤销修订 等于 1))  12725
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_7 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_5=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_5.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getCancelRevisionObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getCancelRevisionObj()):null);//SimpleFieldAssign//sourceId:246730_1_12726
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_5.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_7 = nbPower.queryReceiveFieldDetail(receptionServiceReq_5);
      
      
      receptionServiceRes_3 = receptionServiceRes_7;
           }
//processBranchName:正常结束 ,processBranchId:12727
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("CHANGE_RECORD_OBJ")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getChangeRecordObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getChangeRecordObj() !=null && judgeOrgStructureMgtUsableComRespDto.getChangeRecordObj().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 变更记录 and D1判断组织架构进入管理可用(公共).变更记录 值不等于空  and D1判断组织架构进入管理可用(公共).变更记录 等于 1))  12731
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_8 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_6=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_6.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getChangeRecordObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getChangeRecordObj()):null);//SimpleFieldAssign//sourceId:246730_1_12732
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_6.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_8 = nbPower.queryReceiveFieldDetail(receptionServiceReq_6);
      
      
      receptionServiceRes_3 = receptionServiceRes_8;
           }
//processBranchName:正常结束 ,processBranchId:12733
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("SUSPENDED_OBJ")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getSuspendedObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getSuspendedObj() !=null && judgeOrgStructureMgtUsableComRespDto.getSuspendedObj().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 暂停对外使用 and D1判断组织架构进入管理可用(公共).暂停对外使用 值不等于空  and D1判断组织架构进入管理可用(公共).暂停对外使用 等于 1))  12736
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_9 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_7=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_7.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getSuspendedObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getSuspendedObj()):null);//SimpleFieldAssign//sourceId:246730_1_12737
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_7.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_9 = nbPower.queryReceiveFieldDetail(receptionServiceReq_7);
      
      
      receptionServiceRes_3 = receptionServiceRes_9;
           }
//processBranchName:正常结束 ,processBranchId:12739
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("RESTORE_OBJ")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getRestoreObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getRestoreObj() !=null && judgeOrgStructureMgtUsableComRespDto.getRestoreObj().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 恢复对外使用 and D1判断组织架构进入管理可用(公共).恢复对外使用 值不等于空  and D1判断组织架构进入管理可用(公共).恢复对外使用 等于 1))  12747
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_10 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_8=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_8.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getRestoreObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getRestoreObj()):null);//SimpleFieldAssign//sourceId:246730_1_12748
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_8.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_10 = nbPower.queryReceiveFieldDetail(receptionServiceReq_8);
      
      
      receptionServiceRes_3 = receptionServiceRes_10;
           }
//processBranchName:正常结束 ,processBranchId:12749
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("LOCK_REASON_OBJ")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getLockReasonObj() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getLockReasonObj() !=null && judgeOrgStructureMgtUsableComRespDto.getLockReasonObj().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 锁定原因 and D1判断组织架构进入管理可用(公共).锁定原因 值不等于空  and D1判断组织架构进入管理可用(公共).锁定原因 等于 1))  12751
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_11 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_9=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_9.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getLockReasonObj()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getLockReasonObj()):null);//SimpleFieldAssign//sourceId:246730_1_12752
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_9.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_11 = nbPower.queryReceiveFieldDetail(receptionServiceReq_9);
      
      
      receptionServiceRes_3 = receptionServiceRes_11;
           }
//processBranchName:正常结束 ,processBranchId:12753
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("FIRST_OPERATION")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getFirstOperation() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getFirstOperation() !=null && judgeOrgStructureMgtUsableComRespDto.getFirstOperation().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 首次操作 and D1判断组织架构进入管理可用(公共).首次操作 值不等于空  and D1判断组织架构进入管理可用(公共).首次操作 等于 1))  12754
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_12 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_10=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_10.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getFirstOperation()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getFirstOperation()):null);//SimpleFieldAssign//sourceId:246730_1_12758
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_10.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_12 = nbPower.queryReceiveFieldDetail(receptionServiceReq_10);
      
      
      receptionServiceRes_3 = receptionServiceRes_12;
           }
//processBranchName:正常结束 ,processBranchId:12759
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("TRAILING_OPERATION")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getTrailingOperation() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getTrailingOperation() !=null && judgeOrgStructureMgtUsableComRespDto.getTrailingOperation().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 后续操作 and D1判断组织架构进入管理可用(公共).后续操作 值不等于空  and D1判断组织架构进入管理可用(公共).后续操作 等于 1))  12760
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_13 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_11=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_11.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getTrailingOperation()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getTrailingOperation()):null);//SimpleFieldAssign//sourceId:246730_1_12761
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_11.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_13 = nbPower.queryReceiveFieldDetail(receptionServiceReq_11);
      
      
      receptionServiceRes_3 = receptionServiceRes_13;
           }
//processBranchName:正常结束 ,processBranchId:12762
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("MIXTURE_OPERATION")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getMixtureOperation() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getMixtureOperation() !=null && judgeOrgStructureMgtUsableComRespDto.getMixtureOperation().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 全批次操作 and D1判断组织架构进入管理可用(公共).全批次操作 值不等于空  and D1判断组织架构进入管理可用(公共).全批次操作 等于 1))  12763
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_14 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_12=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_12.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getMixtureOperation()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getMixtureOperation()):null);//SimpleFieldAssign//sourceId:246730_1_12764
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_12.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_14 = nbPower.queryReceiveFieldDetail(receptionServiceReq_12);
      
      
      receptionServiceRes_3 = receptionServiceRes_14;
           }
//processBranchName:正常结束 ,processBranchId:12765
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("DEPT_START_MGT")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getDeptStartMgt() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getDeptStartMgt() !=null && judgeOrgStructureMgtUsableComRespDto.getDeptStartMgt().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 部门开始管理 and D1判断组织架构进入管理可用(公共).部门开始管理 值不等于空  and D1判断组织架构进入管理可用(公共).部门开始管理 等于 1))  14066
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_15 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_13=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_13.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getDeptStartMgt()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getDeptStartMgt()):null);//SimpleFieldAssign//sourceId:246730_1_14067
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_13.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_15 = nbPower.queryReceiveFieldDetail(receptionServiceReq_13);
      
      
      receptionServiceRes_3 = receptionServiceRes_15;
           }
//processBranchName:正常结束 ,processBranchId:14068
        
    }
else if((reqDto!= null&&  reqDto.getBatchMgtOperationType() !=null && reqDto.getBatchMgtOperationType().equals("DEPT_PRESERVE_ACHIEVE")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getDeptPreserveAchieve() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getDeptPreserveAchieve() !=null && judgeOrgStructureMgtUsableComRespDto.getDeptPreserveAchieve().equals("1"))){
       //elseif((D1判断组织架构唯一权限(公共).批次下管理操作类型 等于 部门维护完成 and D1判断组织架构进入管理可用(公共).部门维护完成 值不等于空  and D1判断组织架构进入管理可用(公共).部门维护完成 等于 1))  14069
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_16 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_14=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_14.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getDeptPreserveAchieve()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getDeptPreserveAchieve()):null);//SimpleFieldAssign//sourceId:246730_1_14070
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_14.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_16 = nbPower.queryReceiveFieldDetail(receptionServiceReq_14);
      
      
      receptionServiceRes_3 = receptionServiceRes_16;
           }
//processBranchName:正常结束 ,processBranchId:14071
        
    }
else if((receptionServiceRes!= null&&  receptionServiceRes.getBatchMgtOperationType() !=null && receptionServiceRes.getBatchMgtOperationType().equals("DEPT_OPERATION")&&judgeOrgStructureMgtUsableComRespDto!= null&& judgeOrgStructureMgtUsableComRespDto.getDeptOperation() != null &&judgeOrgStructureMgtUsableComRespDto!= null&&  judgeOrgStructureMgtUsableComRespDto.getDeptOperation() !=null && judgeOrgStructureMgtUsableComRespDto.getDeptOperation().equals("1"))){
       //elseif((M1-确定哪一个管理操作.批次下管理操作类型 等于 部门管理操作 and D1判断组织架构进入管理可用(公共).部门管理操作 值不等于空  and D1判断组织架构进入管理可用(公共).部门管理操作 等于 1))  14407
      
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_17 = null;
    if(judgeOrgStructureMgtUsableComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_15=new QueryReceiveFieldDetailReqDto();
  if(judgeOrgStructureMgtUsableComRespDto!=null){
      receptionServiceReq_15.setOutputNum(judgeOrgStructureMgtUsableComRespDto.getDeptOperation()!=null?Long.valueOf(judgeOrgStructureMgtUsableComRespDto.getDeptOperation()):null);//SimpleFieldAssign//sourceId:246730_1_14409
    }
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_15.getOutputNum(),"D1判断组织架构唯一权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes_17 = nbPower.queryReceiveFieldDetail(receptionServiceReq_15);
      
      
      receptionServiceRes_3 = receptionServiceRes_17;
           }
//processBranchName:正常结束 ,processBranchId:14410
        
    }
      }
JudgeOrgOnlyPowerComRespDto retData = new JudgeOrgOnlyPowerComRespDto();
  if(receptionServiceRes_3!=null){
      retData.setOutputNum(receptionServiceRes_3.getOutputNum());//SimpleFieldAssign//sourceId:194394_1
    }
if(judgeOrgStructureMgtUsableComRespDto_1!=null){
      retData.setBatchId(judgeOrgStructureMgtUsableComRespDto_1.getBatchId());//SimpleFieldAssign//sourceId:200145_1
retData.setBatchCurrentStatus(judgeOrgStructureMgtUsableComRespDto_1.getBatchCurrentStatus());//SimpleFieldAssign//sourceId:194395_1
retData.setMemtMgtSence(judgeOrgStructureMgtUsableComRespDto_1.getMemtMgtSence());//SimpleFieldAssign//sourceId:321023_1
    }
  

  
  
return retData;
  }
/**
   * D1查询当前个人本地权限(公共)[3815]
   * gen by moon at 10/16/2022, 1:53:50 AM
   */
  @Trace(operationName = "D1查询当前个人本地权限(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryCurrentPersonalLocalPowerDetailComRespDto queryCurrentPersonalLocalPowerDetailCom(QueryCurrentPersonalLocalPowerDetailComReqDto reqDto){
    
      
      PrivacyDistribution privacyDistribution_1 =null;
PrivacyDistribution privacyDistribution_3 =null;
PrivacyDistribution privacyDistribution_5 =null;
PrivacyDistribution privacyDistribution_7 =null;
PrivacyDistribution privacyDistribution_9 =null;
if((reqDto!= null&&  reqDto.getTypeCode() !=null && reqDto.getTypeCode().equals("PERSONAL"))) {
        //if(D1查询员工个人权限分配(公共).分配对象类型编码 等于 个人)  11997
        
PrivacyDistribution privacyDistribution = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq=new QueryTributPowerDetailReq();
  queryTributPowerDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:184265_1_11998
queryTributPowerDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:184274_1_11998
queryTributPowerDetailReq.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:184275_1_11998
if(reqDto!=null){
      queryTributPowerDetailReq.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:184264_1_11998
queryTributPowerDetailReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:184263_1_11998
queryTributPowerDetailReq.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:184571_1_11998
    }
  
    /*1-2-12查询身份人员ID权限[498]   */
    Assert.isNull(queryTributPowerDetailReq.getAllocationObjectId(),"D1查询当前个人本地权限(公共)-1-2-12查询身份人员ID权限-分配对象ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getTypeCode(),"D1查询当前个人本地权限(公共)-1-2-12查询身份人员ID权限-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getPrivacyCode(),"D1查询当前个人本地权限(公共)-1-2-12查询身份人员ID权限-权限标识不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getSubjectLifeCycle(),"D1查询当前个人本地权限(公共)-1-2-12查询身份人员ID权限-主体生命周期不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getSpaceId(),"D1查询当前个人本地权限(公共)-1-2-12查询身份人员ID权限-创建于空间ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getAppId(),"D1查询当前个人本地权限(公共)-1-2-12查询身份人员ID权限-创建于联盟应用ID不能为空",false);
      privacyDistribution = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq);
      
      
      privacyDistribution_1 = privacyDistribution;
//processBranchName:正常结束 ,processBranchId:12012
        
      }
else if((reqDto!= null&&  reqDto.getTypeCode() !=null && reqDto.getTypeCode().equals("ROLE"))){
       //elseif(D1查询员工个人权限分配(公共).分配对象类型编码 等于 角色)  11999
      
PrivacyDistribution privacyDistribution_2 = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq_1=new QueryTributPowerDetailReq();
  queryTributPowerDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:184310_1_12000
queryTributPowerDetailReq_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:184319_1_12000
queryTributPowerDetailReq_1.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:184320_1_12000
if(reqDto!=null){
      queryTributPowerDetailReq_1.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:184309_1_12000
queryTributPowerDetailReq_1.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:184308_1_12000
queryTributPowerDetailReq_1.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:184573_1_12000
    }
  
    /*1-2-12查询角色权限分配[498]   */
    Assert.isNull(queryTributPowerDetailReq_1.getAllocationObjectId(),"D1查询当前个人本地权限(公共)-1-2-12查询角色权限分配-分配对象ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq_1.getTypeCode(),"D1查询当前个人本地权限(公共)-1-2-12查询角色权限分配-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerDetailReq_1.getPrivacyCode(),"D1查询当前个人本地权限(公共)-1-2-12查询角色权限分配-权限标识不能为空",false);
Assert.isNull(queryTributPowerDetailReq_1.getSubjectLifeCycle(),"D1查询当前个人本地权限(公共)-1-2-12查询角色权限分配-主体生命周期不能为空",false);
Assert.isNull(queryTributPowerDetailReq_1.getSpaceId(),"D1查询当前个人本地权限(公共)-1-2-12查询角色权限分配-创建于空间ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq_1.getAppId(),"D1查询当前个人本地权限(公共)-1-2-12查询角色权限分配-创建于联盟应用ID不能为空",false);
      privacyDistribution_2 = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq_1);
      
      
      privacyDistribution_3 = privacyDistribution_2;
//processBranchName:正常结束 ,processBranchId:12011
        
    }
else if((reqDto!= null&&  reqDto.getTypeCode() !=null && reqDto.getTypeCode().equals("POSITION"))){
       //elseif(D1查询员工个人权限分配(公共).分配对象类型编码 等于 职务)  12001
      
PrivacyDistribution privacyDistribution_4 = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq_2=new QueryTributPowerDetailReq();
  queryTributPowerDetailReq_2.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:184523_1_12002
queryTributPowerDetailReq_2.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:184524_1_12002
queryTributPowerDetailReq_2.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:184525_1_12002
if(reqDto!=null){
      queryTributPowerDetailReq_2.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:184522_1_12002
queryTributPowerDetailReq_2.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:184521_1_12002
    }
  
    /*1-2-12查询职务权限[498]   */
    Assert.isNull(queryTributPowerDetailReq_2.getAllocationObjectId(),"D1查询当前个人本地权限(公共)-1-2-12查询职务权限-分配对象ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq_2.getTypeCode(),"D1查询当前个人本地权限(公共)-1-2-12查询职务权限-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerDetailReq_2.getPrivacyCode(),"D1查询当前个人本地权限(公共)-1-2-12查询职务权限-权限标识不能为空",false);
Assert.isNull(queryTributPowerDetailReq_2.getSubjectLifeCycle(),"D1查询当前个人本地权限(公共)-1-2-12查询职务权限-主体生命周期不能为空",false);
Assert.isNull(queryTributPowerDetailReq_2.getSpaceId(),"D1查询当前个人本地权限(公共)-1-2-12查询职务权限-创建于空间ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq_2.getAppId(),"D1查询当前个人本地权限(公共)-1-2-12查询职务权限-创建于联盟应用ID不能为空",false);
      privacyDistribution_4 = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq_2);
      
      
      privacyDistribution_5 = privacyDistribution_4;
//processBranchName:正常结束 ,processBranchId:12010
        
    }
else if((reqDto!= null&&  reqDto.getTypeCode() !=null && reqDto.getTypeCode().equals("DEPARTMENT_POSITION"))){
       //elseif(D1查询员工个人权限分配(公共).分配对象类型编码 等于 部门职务)  12004
      
PrivacyDistribution privacyDistribution_6 = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq_3=new QueryTributPowerDetailReq();
  queryTributPowerDetailReq_3.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:184503_1_12005
queryTributPowerDetailReq_3.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:184504_1_12005
queryTributPowerDetailReq_3.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:184505_1_12005
if(reqDto!=null){
      queryTributPowerDetailReq_3.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:184502_1_12005
queryTributPowerDetailReq_3.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:184501_1_12005
queryTributPowerDetailReq_3.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:184575_1_12005
    }
  
    /*1-2-12查询部门职务权限[498]   */
    Assert.isNull(queryTributPowerDetailReq_3.getAllocationObjectId(),"D1查询当前个人本地权限(公共)-1-2-12查询部门职务权限-分配对象ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq_3.getTypeCode(),"D1查询当前个人本地权限(公共)-1-2-12查询部门职务权限-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerDetailReq_3.getPrivacyCode(),"D1查询当前个人本地权限(公共)-1-2-12查询部门职务权限-权限标识不能为空",false);
Assert.isNull(queryTributPowerDetailReq_3.getSubjectLifeCycle(),"D1查询当前个人本地权限(公共)-1-2-12查询部门职务权限-主体生命周期不能为空",false);
Assert.isNull(queryTributPowerDetailReq_3.getSpaceId(),"D1查询当前个人本地权限(公共)-1-2-12查询部门职务权限-创建于空间ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq_3.getAppId(),"D1查询当前个人本地权限(公共)-1-2-12查询部门职务权限-创建于联盟应用ID不能为空",false);
      privacyDistribution_6 = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq_3);
      
      
      privacyDistribution_7 = privacyDistribution_6;
//processBranchName:正常结束 ,processBranchId:12009
        
    }
else if((reqDto!= null&&  reqDto.getTypeCode() !=null && reqDto.getTypeCode().equals("PERSONAL_DEPARTMENT"))){
       //elseif(D1查询员工个人权限分配(公共).分配对象类型编码 等于 部门个人)  12006
      
PrivacyDistribution privacyDistribution_8 = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq_4=new QueryTributPowerDetailReq();
  queryTributPowerDetailReq_4.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:184518_1_12007
queryTributPowerDetailReq_4.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:184519_1_12007
queryTributPowerDetailReq_4.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:184520_1_12007
if(reqDto!=null){
      queryTributPowerDetailReq_4.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:184517_1_12007
queryTributPowerDetailReq_4.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:184516_1_12007
queryTributPowerDetailReq_4.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:184576_1_12007
    }
  
    /*1-2-12查询就职记录权限[498]   */
    Assert.isNull(queryTributPowerDetailReq_4.getAllocationObjectId(),"D1查询当前个人本地权限(公共)-1-2-12查询就职记录权限-分配对象ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq_4.getTypeCode(),"D1查询当前个人本地权限(公共)-1-2-12查询就职记录权限-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerDetailReq_4.getPrivacyCode(),"D1查询当前个人本地权限(公共)-1-2-12查询就职记录权限-权限标识不能为空",false);
Assert.isNull(queryTributPowerDetailReq_4.getSubjectLifeCycle(),"D1查询当前个人本地权限(公共)-1-2-12查询就职记录权限-主体生命周期不能为空",false);
Assert.isNull(queryTributPowerDetailReq_4.getSpaceId(),"D1查询当前个人本地权限(公共)-1-2-12查询就职记录权限-创建于空间ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq_4.getAppId(),"D1查询当前个人本地权限(公共)-1-2-12查询就职记录权限-创建于联盟应用ID不能为空",false);
      privacyDistribution_8 = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq_4);
      
      
      privacyDistribution_9 = privacyDistribution_8;
//processBranchName:正常结束 ,processBranchId:12008
        
    }
QueryCurrentPersonalLocalPowerDetailComRespDto retData = new QueryCurrentPersonalLocalPowerDetailComRespDto();
  if(privacyDistribution_1!=null){
      retData.setPrivacyCode(privacyDistribution_1.getPrivacyCode());//SimpleFieldAssign//sourceId:184631_1
    }
if(privacyDistribution_3!=null){
      retData.setPrivacyCode(privacyDistribution_3.getPrivacyCode());//SimpleFieldAssign//sourceId:184631_1
    }
if(privacyDistribution_5!=null){
      retData.setPrivacyCode(privacyDistribution_5.getPrivacyCode());//SimpleFieldAssign//sourceId:184631_1
    }
if(privacyDistribution_7!=null){
      retData.setPrivacyCode(privacyDistribution_7.getPrivacyCode());//SimpleFieldAssign//sourceId:184631_1
    }
if(privacyDistribution_9!=null){
      retData.setPrivacyCode(privacyDistribution_9.getPrivacyCode());//SimpleFieldAssign//sourceId:184631_1
    }
  

  
  
return retData;
  }
/**
   * D1-2执行权限更新状态(公共)[3762]
   * gen by moon at 9/20/2023, 11:29:22 PM
   */
  @Trace(operationName = "D1-2执行权限更新状态(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ImplementPowerUpdateStatusComRespDto implementPowerUpdateStatusCom(ImplementPowerUpdateStatusComReqDto reqDto){
    
      
      //步骤0: 1-2-12批量查询权限分配列表 - batchQueryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    BatchQueryTributPowerListReq batchQueryTributPowerListReq=new BatchQueryTributPowerListReq();
  batchQueryTributPowerListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:178226_1
if(reqDto!=null){
      batchQueryTributPowerListReq.setTributPowerList(reqDto.getTributPowerList());//list-field-assign//sourceId:178224_1
batchQueryTributPowerListReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:178223_1
    }
  
    /*1-2-12批量查询当前有效权限分配列表[702]   */
    Assert.isNull(batchQueryTributPowerListReq.getTypeCode(),"D1-2执行权限更新状态(公共)-1-2-12批量查询当前有效权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(batchQueryTributPowerListReq.getSubjectLifeCycle(),"D1-2执行权限更新状态(公共)-1-2-12批量查询当前有效权限分配列表-主体生命周期不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.batchQueryTributPowerList(batchQueryTributPowerListReq)/*vcase invoke 本地 method 方法调用;*/;
      
      
      
    
//步骤1: 1-2-12批量修改权限分配 - batchUpdateTributPower
     boolean bOOLEAN ;
    List<PrivacyDistribution> listPrivacyDistribution_2=new ArrayList<>();
  //todo dong 未找到匹配生成策略,请检查生成策略listPrivacyDistribution_2=reqDto.getTributPowerList();,数据源项; to( ==>tableName:undefined, fieldEnname:tributPowerList ,uniqueId: 178232_1 uniqueSourceId:178255_1) from (varName:undefined fieldreqDto.getTributPowerList())
  
    /*1-2-12批量修改权限分配[1554]   */
    
      bOOLEAN = mPrivacyDistributionService.batchUpdateTributPower(listPrivacyDistribution_2)/*vcase invoke 本地 method 方法调用;*/;
      
      
      
    
//步骤2: 1-2-12批量查询权限分配列表 - batchQueryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution_3 =new ArrayList<>();
    BatchQueryTributPowerListReq batchQueryTributPowerListReq_1=new BatchQueryTributPowerListReq();
  batchQueryTributPowerListReq_1.setSubjectLifeCycle("EDITING");//sourceId:178242_1
if(reqDto!=null){
      batchQueryTributPowerListReq_1.setTributPowerList(reqDto.getTributPowerList());//list-field-assign//sourceId:178240_1
batchQueryTributPowerListReq_1.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:178239_1
    }
  
    /*1-2-12批量查询正在编辑权限分配列表[702]   */
    Assert.isNull(batchQueryTributPowerListReq_1.getTypeCode(),"D1-2执行权限更新状态(公共)-1-2-12批量查询正在编辑权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(batchQueryTributPowerListReq_1.getSubjectLifeCycle(),"D1-2执行权限更新状态(公共)-1-2-12批量查询正在编辑权限分配列表-主体生命周期不能为空",false);
      listPrivacyDistribution_3 = mPrivacyDistributionService.batchQueryTributPowerList(batchQueryTributPowerListReq_1)/*vcase invoke 本地 method 方法调用;*/;
      
      
      
    
//步骤3: 1-2-12批量删除权限分配 - batchDeleteTributPower
     boolean bOOLEAN_1 ;
    if(listPrivacyDistribution_3 !=null&& !CollectionUtil.isEmpty(listPrivacyDistribution_3)&& listPrivacyDistribution_3.size()>0 ){
          List<String> listString=new ArrayList<>();
  if(listPrivacyDistribution_3!= null&& !CollectionUtil.isEmpty(listPrivacyDistribution_3)&&  listPrivacyDistribution_3 !=null&& !CollectionUtil.isEmpty(listPrivacyDistribution_3)){
  listString = listPrivacyDistribution_3.stream().map(item->item.getPrivacyDistributionId())
        .collect(Collectors.toList());/*list-to-strings*///sourceId:178248_1
    }

    /*1-2-12批量删除权限分配[1553]   */
    
      bOOLEAN_1 = mPrivacyDistributionService.batchDeleteTributPower(listString)/*vcase invoke 本地 method 方法调用;*/;
      
      
      
           }
    
ImplementPowerUpdateStatusComRespDto retData = new ImplementPowerUpdateStatusComRespDto();
  
  

  
  
return retData;
  }
/**
   * D1查询当前个人权限(公共)[3817]
   * gen by moon at 10/16/2022, 1:53:52 AM
   */
  @Trace(operationName = "D1查询当前个人权限(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryCurrentPersonalPowerDetailComRespDto queryCurrentPersonalPowerDetailCom(QueryCurrentPersonalPowerDetailComReqDto reqDto){
    
      
      QueryGetInfoFromRedisDetailRespDto getUserAllPowerRes_1 =null;
QueryCurrentPersonalLocalPowerDetailComRespDto queryCurrentPersonalLocalPowerDetailComRespDto_1 =null;
//virtualUsage M1-redis获取当前身份人员权限  12056
      //ModelCode: getUserAllPower
        QueryGetInfoFromRedisDetailRespDto getUserAllPowerRes = null;
    QueryGetInfoFromRedisDetailReqDto getUserAllPowerReq=new QueryGetInfoFromRedisDetailReqDto();
  getUserAllPowerReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:186575_1_12056
if(reqDto!=null){
      getUserAllPowerReq.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:190151_1_12056
getUserAllPowerReq.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:186577_1_12056
    }
  
    /*M1-redis获取当前身份人员权限[3822]  前端入参权限数据集，和用户信息中的权限数据集进行比对，返回用户有的权限集合 */
    Assert.isNull(getUserAllPowerReq.getOriginalRoleMemberId(),"D1查询当前个人权限(公共)-M1-redis获取当前身份人员权限-身份人员ID不能为空",false);
Assert.isNull(getUserAllPowerReq.getPrivacyCode(),"D1查询当前个人权限(公共)-M1-redis获取当前身份人员权限-权限标识不能为空",false);
Assert.isNull(getUserAllPowerReq.getSpaceId(),"D1查询当前个人权限(公共)-M1-redis获取当前身份人员权限-创建于空间ID不能为空",false);
      getUserAllPowerRes = nbPower.queryGetInfoFromRedisDetail(getUserAllPowerReq);
      
      
      getUserAllPowerRes_1 = getUserAllPowerRes;
if((getUserAllPowerRes!= null&& getUserAllPowerRes.getPrivacyCode() == null ||getUserAllPowerRes!= null&& getUserAllPowerRes.getPrivacyCode() != null )) {
        //if((M1-redis获取当前身份人员权限.权限标识 值等于空  or M1-redis获取当前身份人员权限.权限标识 值不等于空 ))  12057
        
QueryCurrentPersonalLocalPowerDetailComRespDto queryCurrentPersonalLocalPowerDetailComRespDto = null;
    QueryCurrentPersonalLocalPowerDetailComReqDto queryCurrentPersonalLocalPowerDetailComReqDto=new QueryCurrentPersonalLocalPowerDetailComReqDto();
  if(reqDto!=null){
      queryCurrentPersonalLocalPowerDetailComReqDto.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:184635_1_12058
queryCurrentPersonalLocalPowerDetailComReqDto.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:184634_1_12058
queryCurrentPersonalLocalPowerDetailComReqDto.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:184636_1_12058
    }
  
    /*D1查询当前个人本地权限(公共)[3815]   */
    Assert.isNull(queryCurrentPersonalLocalPowerDetailComReqDto.getAllocationObjectId(),"D1查询当前个人权限(公共)-D1查询当前个人本地权限(公共)-分配对象ID不能为空",false);
Assert.isNull(queryCurrentPersonalLocalPowerDetailComReqDto.getTypeCode(),"D1查询当前个人权限(公共)-D1查询当前个人本地权限(公共)-分配对象类型编码不能为空",false);
Assert.isNull(queryCurrentPersonalLocalPowerDetailComReqDto.getPrivacyCode(),"D1查询当前个人权限(公共)-D1查询当前个人本地权限(公共)-权限标识不能为空",false);
      queryCurrentPersonalLocalPowerDetailComRespDto = queryCurrentPersonalLocalPowerDetailCom(queryCurrentPersonalLocalPowerDetailComReqDto);
      
      
      queryCurrentPersonalLocalPowerDetailComRespDto_1 = queryCurrentPersonalLocalPowerDetailComRespDto;
//processBranchName:正常结束 ,processBranchId:12059
        
      }
//processBranchName:正常结束 ,processBranchId:12060
        
QueryCurrentPersonalPowerDetailComRespDto retData = new QueryCurrentPersonalPowerDetailComRespDto();
  if(getUserAllPowerRes_1!=null){
      retData.setPrivacyCode(getUserAllPowerRes_1.getPrivacyCode());//SimpleFieldAssign//sourceId:184638_1
    }
if(queryCurrentPersonalLocalPowerDetailComRespDto_1!=null){
      retData.setPrivacyCode(queryCurrentPersonalLocalPowerDetailComRespDto_1.getPrivacyCode());//SimpleFieldAssign//sourceId:184638_1
    }
  

  
  
return retData;
  }
/**
   * D1查询当前用户指定角色权限(公共)[3831]
   * gen by moon at 2/20/2023, 2:36:28 PM
   */
  @Trace(operationName = "D1查询当前用户指定角色权限(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryCurrentUserRolePowerDetailComRespDto queryCurrentUserRolePowerDetailCom(QueryCurrentUserRolePowerDetailComReqDto reqDto){
    
      
      QueryReceiveFieldDetailRespDto receptionServiceRes_1 =null;
//virtualUsage 1-2-08查询角色详情  12341
      SceneRole sceneRole = null;
    QueryRoleDetailReq queryRoleDetailReq=new QueryRoleDetailReq();
  queryRoleDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:191072_1_12341
if(reqDto!=null){
      queryRoleDetailReq.setRoleCode(reqDto.getRoleCode());//SimpleFieldAssign//sourceId:191070_1_12341
    }
  
    /*1-2-08查询角色详情[170]   */
    Assert.isNull(queryRoleDetailReq.getRoleCode(),"D1查询当前用户指定角色权限(公共)-1-2-08查询角色详情-角色标识不能为空",false);
Assert.isNull(queryRoleDetailReq.getSubjectLifeCycle(),"D1查询当前用户指定角色权限(公共)-1-2-08查询角色详情-主体生命周期不能为空",false);
      sceneRole = mSceneRoleService.queryRoleDetail(queryRoleDetailReq);
      Assert.isTrue(sceneRole== null||  sceneRole.getRoleId() ==null,"找不到数据，系统异常",false);
      
      
//virtualUsage 1-2-13查询角色人员详情  14112
      RoleMember roleMember = null;
    if(sceneRole !=null){
          QueryRoleRelDetailReq queryRoleRelDetailReq=new QueryRoleRelDetailReq();
  queryRoleRelDetailReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:247231_1_14112
queryRoleRelDetailReq.setRelationshipValid("FALSE");//sourceId:247233_1_14112
queryRoleRelDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:247237_1_14112
if(sceneRole!=null){
      queryRoleRelDetailReq.setRoleId(sceneRole.getRoleId());//SimpleFieldAssign//sourceId:247230_1_14112
    }
  
    /*1-2-13查询角色人员详情[335]   */
    Assert.isNull(queryRoleRelDetailReq.getRoleId(),"D1查询当前用户指定角色权限(公共)-1-2-13查询角色人员详情-角色ID不能为空",false);
Assert.isNull(queryRoleRelDetailReq.getOriginalRoleMemberId(),"D1查询当前用户指定角色权限(公共)-1-2-13查询角色人员详情-身份人员ID不能为空",false);
Assert.isNull(queryRoleRelDetailReq.getRelationshipValid(),"D1查询当前用户指定角色权限(公共)-1-2-13查询角色人员详情-是否失效不能为空",false);
Assert.isNull(queryRoleRelDetailReq.getSubjectLifeCycle(),"D1查询当前用户指定角色权限(公共)-1-2-13查询角色人员详情-主体生命周期不能为空",false);
      roleMember = mRoleMemberService.queryRoleRelDetail(queryRoleRelDetailReq);
      
      
      
           }
if((sceneRole != null &&roleMember != null )) {
        //if((1-2-08查询角色详情.出参 值不等于空  and 1-2-13查询角色人员详情.出参 值不等于空 ))  12343
        
QueryCurrentPersonalPowerDetailComRespDto queryCurrentPersonalPowerDetailComRespDto = null;
    if(roleMember !=null){
          QueryCurrentPersonalPowerDetailComReqDto queryCurrentPersonalPowerDetailComReqDto=new QueryCurrentPersonalPowerDetailComReqDto();
  queryCurrentPersonalPowerDetailComReqDto.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:191050_1_14113
queryCurrentPersonalPowerDetailComReqDto.setTypeCode("ROLE");//sourceId:191048_1_14113
if(roleMember!=null){
      queryCurrentPersonalPowerDetailComReqDto.setAllocationObjectId(roleMember.getRoleId());//SimpleFieldAssign//sourceId:191047_1_14113
    }
if(reqDto!=null){
      queryCurrentPersonalPowerDetailComReqDto.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:191049_1_14113
    }
  
    /*D1查询当前个人权限(公共)[3817]   */
    Assert.isNull(queryCurrentPersonalPowerDetailComReqDto.getOriginalRoleMemberId(),"D1查询当前用户指定角色权限(公共)-D1查询当前个人权限(公共)-身份人员ID不能为空",false);
Assert.isNull(queryCurrentPersonalPowerDetailComReqDto.getAllocationObjectId(),"D1查询当前用户指定角色权限(公共)-D1查询当前个人权限(公共)-分配对象ID不能为空",false);
Assert.isNull(queryCurrentPersonalPowerDetailComReqDto.getTypeCode(),"D1查询当前用户指定角色权限(公共)-D1查询当前个人权限(公共)-分配对象类型编码不能为空",false);
Assert.isNull(queryCurrentPersonalPowerDetailComReqDto.getPrivacyCode(),"D1查询当前用户指定角色权限(公共)-D1查询当前个人权限(公共)-权限标识不能为空",false);
      queryCurrentPersonalPowerDetailComRespDto = queryCurrentPersonalPowerDetailCom(queryCurrentPersonalPowerDetailComReqDto);
      
      
      
           }
if((queryCurrentPersonalPowerDetailComRespDto != null )) {
        //if(D1查询当前个人权限(公共).出参 值不等于空 )  14114
        
//ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes = null;
    QueryReceiveFieldDetailReqDto receptionServiceReq=new QueryReceiveFieldDetailReqDto();
  receptionServiceReq.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:244983_1_14115
  
    /*M1-有值可操作[3715]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq.getOutputNum(),"D1查询当前用户指定角色权限(公共)-M1-有值可操作-传输数值（整数型）不能为空",false);
      receptionServiceRes = nbPower.queryReceiveFieldDetail(receptionServiceReq);
      
      
      receptionServiceRes_1 = receptionServiceRes;
//processBranchName:正常结束 ,processBranchId:14116
        
      }
else{
       //else  14117
      
//processBranchName:正常结束 ,processBranchId:14118
        
    }
      }
QueryCurrentUserRolePowerDetailComRespDto retData = new QueryCurrentUserRolePowerDetailComRespDto();
  if(receptionServiceRes_1!=null){
      retData.setOutputNum(receptionServiceRes_1.getOutputNum());//SimpleFieldAssign//sourceId:194319_1
    }
  

  
  
return retData;
  }
/**
   * D1-2查询当前就职记录部门管理权限详情(公共)[3793]
   * gen by moon at 11/5/2022, 9:50:13 PM
   */
  @Trace(operationName = "D1-2查询当前就职记录部门管理权限详情(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryPresentInaugurationDeptMgtPowerDetailComRespDto queryPresentInaugurationDeptMgtPowerDetailCom(QueryPresentInaugurationDeptMgtPowerDetailComReqDto reqDto){
    
      
      ManagedDept managedDept_1 =null;
InductionRecord inductionRecord_1 =null;
//virtualUsage 1-3-09查询部门（层级）  21178
      Dept dept = null;
    QueryDeptDetailReq queryDeptDetailReq=new QueryDeptDetailReq();
  queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:422644_1_21178
if(reqDto!=null){
      queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:422622_1_21178
    }

    /*1-3-09查询部门（层级）[218]   */
    Assert.isNull(queryDeptDetailReq.getDeptId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-3-09查询部门（层级）-部门ID不能为空",false);
Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-3-09查询部门（层级）-主体生命周期不能为空",false);
      dept = mDeptService.queryDeptDetail(queryDeptDetailReq);



if((dept != null &&dept!= null&& dept.getLevelNumber() != null &&dept!= null&& dept.getLevelNumber() == 1L)) {
        //if((1-3-09查询部门（层级）.出参 值不等于空  and 1-3-09查询部门（层级）.层级 值不等于空  and 1-3-09查询部门（层级）.层级 等于 1))  21179

ManagedDept managedDept = null;
    QueryManageDeptDetailReq queryManageDeptDetailReq=new QueryManageDeptDetailReq();
  queryManageDeptDetailReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:180798_1_21180
queryManageDeptDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:180676_1_21180
if(reqDto!=null){
      queryManageDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:180670_1_21180
    }
  
    /*1-2-14查询管理的部门详情[1087]   */
    Assert.isNull(queryManageDeptDetailReq.getDeptId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-2-14查询管理的部门详情-部门ID不能为空",false);
Assert.isNull(queryManageDeptDetailReq.getOriginalRoleMemberId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-2-14查询管理的部门详情-身份人员ID不能为空",false);
Assert.isNull(queryManageDeptDetailReq.getSpaceId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-2-14查询管理的部门详情-创建于空间ID不能为空",false);
      managedDept = mManagedDeptService.queryManageDeptDetail(queryManageDeptDetailReq);
      
      
      managedDept_1 = managedDept;
      }
else if((dept != null &&dept!= null&& dept.getLevelNumber() != null &&dept!= null&& dept.getLevelNumber() > 1L)){
       //elseif((1-3-09查询部门（层级）.出参 值不等于空  and 1-3-09查询部门（层级）.层级 值不等于空  and 1-3-09查询部门（层级）.层级 大于 1))  21181

PrivacyDistribution privacyDistribution = null;
    QueryTributPowerDetailReq queryTributPowerDetailReq=new QueryTributPowerDetailReq();
  queryTributPowerDetailReq.setPrivacyCode("GRASS_ROOTS_UNIT_MGT_POWER");//CUSTOM_CONVENTION//sourceId:422416_1_21182
queryTributPowerDetailReq.setTypeCode("PERSONAL_DEPARTMENT");//sourceId:422379_1_21182
queryTributPowerDetailReq.setAllocationObjectId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:422380_1_21182
queryTributPowerDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:422381_1_21182
queryTributPowerDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:422390_1_21182

    /*1-2-12查当前就职记录的基层部门常用管理权限分配情况[498]   */
    Assert.isNull(queryTributPowerDetailReq.getPrivacyCode(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-2-12查当前就职记录的基层部门常用管理权限分配情况-权限标识不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getTypeCode(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-2-12查当前就职记录的基层部门常用管理权限分配情况-分配对象类型编码不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getAllocationObjectId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-2-12查当前就职记录的基层部门常用管理权限分配情况-分配对象ID不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getSubjectLifeCycle(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-2-12查当前就职记录的基层部门常用管理权限分配情况-主体生命周期不能为空",false);
Assert.isNull(queryTributPowerDetailReq.getSpaceId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-2-12查当前就职记录的基层部门常用管理权限分配情况-创建于空间ID不能为空",false);
      privacyDistribution = mPrivacyDistributionService.queryTributPowerDetail(queryTributPowerDetailReq);



InductionRecord inductionRecord = null;
    if(privacyDistribution !=null){
          QueryinductionRecordDetailReq queryinductionRecordDetailReq=new QueryinductionRecordDetailReq();
  queryinductionRecordDetailReq.setInductionUnitTypeCode("DEPT");//sourceId:422473_1_21183
queryinductionRecordDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:422475_1_21183
queryinductionRecordDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:422478_1_21183
if(privacyDistribution!=null){
      queryinductionRecordDetailReq.setInductionRecordId(privacyDistribution.getAllocationObjectId());//SimpleFieldAssign//sourceId:422418_1_21183
    }
if(reqDto!=null){
      queryinductionRecordDetailReq.setEntityId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:422474_1_21183
    }

    /*1-3-13判断就职记录权限分配的部门是否一致[165]   */
    Assert.isNull(queryinductionRecordDetailReq.getInductionRecordId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-3-13判断就职记录权限分配的部门是否一致-就职记录ID不能为空",false);
Assert.isNull(queryinductionRecordDetailReq.getInductionUnitTypeCode(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-3-13判断就职记录权限分配的部门是否一致-就职单位类型实例不能为空",false);
Assert.isNull(queryinductionRecordDetailReq.getEntityId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-3-13判断就职记录权限分配的部门是否一致-就职单位对象实例ID不能为空",false);
Assert.isNull(queryinductionRecordDetailReq.getSubjectLifeCycle(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-3-13判断就职记录权限分配的部门是否一致-主体生命周期不能为空",false);
Assert.isNull(queryinductionRecordDetailReq.getSpaceId(),"D1-2查询当前就职记录部门管理权限详情(公共)-1-3-13判断就职记录权限分配的部门是否一致-创建于空间ID不能为空",false);
      inductionRecord = mInductionRecordService.queryinductionRecordDetail(queryinductionRecordDetailReq);


      inductionRecord_1 = inductionRecord;
           }
    }
//processBranchName:正常结束 ,processBranchId:21185

QueryPresentInaugurationDeptMgtPowerDetailComRespDto retData = new QueryPresentInaugurationDeptMgtPowerDetailComRespDto();
  if(managedDept_1!=null){
      retData.setDeptId(managedDept_1.getDeptId());//SimpleFieldAssign//sourceId:420238_1
    }
if(inductionRecord_1!=null){
      retData.setDeptId(inductionRecord_1.getEntityId());//SimpleFieldAssign//sourceId:420238_1
    }


  
  
return retData;
  }
/**
   * D1查询当前员工角色权限列表(公共)[3091]
   * gen by moon at 8/31/2024, 12:47:05 PM
   */
  @Trace(operationName = "D1查询当前员工角色权限列表(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryCurrentStaffRolePowerListComRespDto queryCurrentStaffRolePowerListCom(QueryCurrentStaffRolePowerListComReqDto reqDto){
    
      
      List<PrivacyDistribution> listPrivacyDistribution_1 =new ArrayList<>();
//virtualUsage 1-2-08查询用于权限角色列表  27364
     List<RoleMember> listRoleMember =new ArrayList<>();
    QueryRoleOfPowerListReq queryRoleOfPowerListReq=new QueryRoleOfPowerListReq();
  if(reqDto!=null){
      queryRoleOfPowerListReq.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:104731_1_27364
    }
  
    /*1-2-08查询用于权限角色列表[2184]   */
    Assert.isNull(queryRoleOfPowerListReq.getOriginalRoleMemberId(),"D1查询当前员工角色权限列表(公共)-1-2-08查询用于权限角色列表-身份人员ID不能为空",false);
      listRoleMember = mRoleMemberService.queryRoleOfPowerList(queryRoleOfPowerListReq)/*vcase invoke 本地 method 方法调用;*/;
      
      
      
if((listRoleMember!= null&&  listRoleMember !=null && listRoleMember.size()>0&&listRoleMember!= null&&  listRoleMember !=null && listRoleMember.size()>0)) {
        //if(1-2-08查询用于权限角色列表.角色人员列表数据集条数 大于 0)  27365

     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    if(listRoleMember !=null&& !CollectionUtil.isEmpty(listRoleMember)&& listRoleMember.size()>0 ){
          BatchQueryTributPowerListReq batchQueryTributPowerListReq=new BatchQueryTributPowerListReq();
  batchQueryTributPowerListReq.setTypeCode("ROLE");//sourceId:104733_1_27366
batchQueryTributPowerListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:104736_1_27366
batchQueryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:612644_1_27366
if(listRoleMember!= null&& !CollectionUtil.isEmpty(listRoleMember)&&  listRoleMember !=null&& !CollectionUtil.isEmpty(listRoleMember)){
  batchQueryTributPowerListReq.setTributPowerList(listRoleMember.stream().map(item->item.getRoleId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:104734_1_27366
    }
if(reqDto!=null){
      batchQueryTributPowerListReq.setIsDataPrivacy(reqDto.getIsDataPrivacy());//SimpleFieldAssign//sourceId:104738_1_27366
batchQueryTributPowerListReq.setPrivacyCategory(reqDto.getPrivacyCategory());//SimpleFieldAssign//sourceId:104739_1_27366
batchQueryTributPowerListReq.setDataModel(reqDto.getDataModel());//SimpleFieldAssign//sourceId:104740_1_27366
batchQueryTributPowerListReq.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:105410_1_27366
    }
  
    /*1-2-12批量查询权限分配列表[702]   */
    Assert.isNull(batchQueryTributPowerListReq.getTypeCode(),"D1查询当前员工角色权限列表(公共)-1-2-12批量查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(batchQueryTributPowerListReq.getSubjectLifeCycle(),"D1查询当前员工角色权限列表(公共)-1-2-12批量查询权限分配列表-主体生命周期不能为空",false);
Assert.isNull(batchQueryTributPowerListReq.getSpaceId(),"D1查询当前员工角色权限列表(公共)-1-2-12批量查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.batchQueryTributPowerList(batchQueryTributPowerListReq)/*vcase invoke 本地 method 方法调用;*/;
      
      
      listPrivacyDistribution_1 = listPrivacyDistribution;
           }
      }
QueryCurrentStaffRolePowerListComRespDto retData = new QueryCurrentStaffRolePowerListComRespDto();
  retData.setTributPowerList(listPrivacyDistribution_1.stream().map(item -> BeanUtil.toBean(item, TributPowerDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:304412_1
  

  
  
return retData;
  }
/**
   * D1-2查询当前用户就职记录权限列表(公共)[4548]
   * gen by moon at 10/7/2024, 9:43:38 PM
   */
  @Trace(operationName = "D1-2查询当前用户就职记录权限列表(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryCurrentUserRecordTributPowerListComRespDto queryCurrentUserRecordTributPowerListCom(QueryCurrentUserRecordTributPowerListComReqDto reqDto){
    
      
      List<PrivacyDistribution> listPrivacyDistribution_1 =new ArrayList<>();
//步骤0: 1-2-08查询当前用户就职记录权限列表 - queryCurrentUserRecordTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    QueryCurrentUserRecordTributPowerListReq queryCurrentUserRecordTributPowerListReq=new QueryCurrentUserRecordTributPowerListReq();
queryCurrentUserRecordTributPowerListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:322936_1
if(reqDto!=null){
      queryCurrentUserRecordTributPowerListReq.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:322932_1
queryCurrentUserRecordTributPowerListReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:322933_1
queryCurrentUserRecordTributPowerListReq.setIsDataPrivacy(reqDto.getIsDataPrivacy());//SimpleFieldAssign//sourceId:2015376_1
queryCurrentUserRecordTributPowerListReq.setDataModel(reqDto.getDataModel());//SimpleFieldAssign//sourceId:322934_1
queryCurrentUserRecordTributPowerListReq.setPrivacyCategory(reqDto.getPrivacyCategory());//SimpleFieldAssign//sourceId:322941_1
queryCurrentUserRecordTributPowerListReq.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:322943_1
    }
  
    /*1-2-08查询当前用户就职记录权限列表[4549]   */
Assert.isNull(queryCurrentUserRecordTributPowerListReq.getSubjectLifeCycle(),"D1-2查询当前用户就职记录权限列表(公共)-1-2-08查询当前用户就职记录权限列表-主体生命周期不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.queryCurrentUserRecordTributPowerList(queryCurrentUserRecordTributPowerListReq)/*vcase invoke 本地 method 方法调用;*/;
      
      
      listPrivacyDistribution_1 = listPrivacyDistribution;
    
QueryCurrentUserRecordTributPowerListComRespDto retData = new QueryCurrentUserRecordTributPowerListComRespDto();
  retData.setCurrentUserRecordTributPowerList(listPrivacyDistribution_1.stream().map(item -> BeanUtil.toBean(item, CurrentUserRecordTributPowerDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:322940_1
  

  
  
return retData;
  }
/**
   * D1-2查询当前用户就职记录权限(公共)[4546]
   * gen by moon at 10/1/2022, 11:49:34 PM
   */
  @Trace(operationName = "D1-2查询当前用户就职记录权限(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryCurrentUserRecordTributPowerDetailComRespDto queryCurrentUserRecordTributPowerDetailCom(QueryCurrentUserRecordTributPowerDetailComReqDto reqDto){
    
      
      PrivacyDistribution privacyDistribution_1 =null;
//步骤0: 1-2-08查询个人就职记录权限分配详情 - queryPersonalRecordTributPowerDetail
     PrivacyDistribution privacyDistribution = null;
    QueryPersonalRecordTributPowerDetailReq queryPersonalRecordTributPowerDetailReq=new QueryPersonalRecordTributPowerDetailReq();
  queryPersonalRecordTributPowerDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:322909_1
if(reqDto!=null){
      queryPersonalRecordTributPowerDetailReq.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:322904_1
queryPersonalRecordTributPowerDetailReq.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:322908_1
queryPersonalRecordTributPowerDetailReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:322907_1
queryPersonalRecordTributPowerDetailReq.setPrivacyCategory(reqDto.getPrivacyCategory());//SimpleFieldAssign//sourceId:322947_1
queryPersonalRecordTributPowerDetailReq.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:322949_1
    }
  
    /*1-2-08查询个人就职记录权限分配详情[4547]   */
    Assert.isNull(queryPersonalRecordTributPowerDetailReq.getPrivacyCode(),"D1-2查询当前用户就职记录权限(公共)-1-2-08查询个人就职记录权限分配详情-权限标识不能为空",false);
Assert.isNull(queryPersonalRecordTributPowerDetailReq.getAllocationObjectId(),"D1-2查询当前用户就职记录权限(公共)-1-2-08查询个人就职记录权限分配详情-分配对象ID不能为空",false);
Assert.isNull(queryPersonalRecordTributPowerDetailReq.getTypeCode(),"D1-2查询当前用户就职记录权限(公共)-1-2-08查询个人就职记录权限分配详情-分配对象类型编码不能为空",false);
Assert.isNull(queryPersonalRecordTributPowerDetailReq.getSubjectLifeCycle(),"D1-2查询当前用户就职记录权限(公共)-1-2-08查询个人就职记录权限分配详情-主体生命周期不能为空",false);
      privacyDistribution = mPrivacyDistributionService.queryPersonalRecordTributPowerDetail(queryPersonalRecordTributPowerDetailReq);
      
      
      privacyDistribution_1 = privacyDistribution;
    
QueryCurrentUserRecordTributPowerDetailComRespDto retData = new QueryCurrentUserRecordTributPowerDetailComRespDto();
  if(privacyDistribution_1!=null){
      retData.setPrivacyDistributionId(privacyDistribution_1.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:322914_1
retData.setPrivacyCode(privacyDistribution_1.getPrivacyCode());//SimpleFieldAssign//sourceId:322915_1
    }
  

  
  
return retData;
  }
/**
   * D1-2批量查询当前用户就职记录权限(公共)[4569]
   * gen by moon at 10/2/2022, 6:51:41 AM
   */
  @Trace(operationName = "D1-2批量查询当前用户就职记录权限(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchQueryCurrentUserRecordTributPowerComRespDto batchQueryCurrentUserRecordTributPowerCom(BatchQueryCurrentUserRecordTributPowerComReqDto reqDto){
    
      
      List<PrivacyDistribution> listPrivacyDistribution_1 =new ArrayList<>();
//步骤0: 1-2-08批量查询当前用户就职记录权限 - batchQueryCurrentUserRecordTributPower
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    BatchQueryCurrentUserRecordTributPowerReq batchQueryCurrentUserRecordTributPowerReq=new BatchQueryCurrentUserRecordTributPowerReq();
  if(reqDto!=null){
      //list-field-assign
    batchQueryCurrentUserRecordTributPowerReq.setTributPowerList(reqDto.getTributPowerList());//sourceId:329902_1
batchQueryCurrentUserRecordTributPowerReq.setDataModel(reqDto.getDataModel());//SimpleFieldAssign//sourceId:329920_1
batchQueryCurrentUserRecordTributPowerReq.setIsportPrivacy(reqDto.getIsportPrivacy());//SimpleFieldAssign//sourceId:329903_1
batchQueryCurrentUserRecordTributPowerReq.setPrivacyRoute(reqDto.getPrivacyRoute());//SimpleFieldAssign//sourceId:329904_1
batchQueryCurrentUserRecordTributPowerReq.setIsDataPrivacy(reqDto.getIsDataPrivacy());//SimpleFieldAssign//sourceId:329905_1
batchQueryCurrentUserRecordTributPowerReq.setPrivacyCategory(reqDto.getPrivacyCategory());//SimpleFieldAssign//sourceId:329906_1
batchQueryCurrentUserRecordTributPowerReq.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:329907_1
batchQueryCurrentUserRecordTributPowerReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:329908_1
batchQueryCurrentUserRecordTributPowerReq.setAllocationObjectId(reqDto.getAllocationObjectId());//SimpleFieldAssign//sourceId:329909_1
batchQueryCurrentUserRecordTributPowerReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:329910_1
    }
  
    /*1-2-08批量查询当前用户就职记录权限[4568]   */
    
      listPrivacyDistribution = mPrivacyDistributionService.batchQueryCurrentUserRecordTributPower(batchQueryCurrentUserRecordTributPowerReq);
      
      
      listPrivacyDistribution_1 = listPrivacyDistribution;
    
BatchQueryCurrentUserRecordTributPowerComRespDto retData = new BatchQueryCurrentUserRecordTributPowerComRespDto();
  retData.setTributPowerList(listPrivacyDistribution_1.stream().map(item -> BeanUtil.toBean(item, TributPowerDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:329912_1
  

  
  
return retData;
  }
/**
   * D1-2-14删除管理的部门[4570]
   * gen by moon at 10/2/2022, 6:58:56 AM
   */
  @Trace(operationName = "D1-2-14删除管理的部门")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public DeleteManageDeptRespDto deleteManageDept(DeleteManageDeptReqDto reqDto){
    
      
      //步骤0: 1-2-14删除管理的部门 - deleteManageDept
     boolean bOOLEAN ;
    String string=new String();
  if(reqDto!=null){
      string=reqDto.getManagedDepId();;//SimpleFieldAssign//sourceId:330016_1
    }
  
    /*1-2-14删除管理的部门[1230]   */
    Assert.isNull(string,"D1-2-14删除管理的部门-1-2-14删除管理的部门-管理的部门ID不能为空",false);
      bOOLEAN = mManagedDeptService.deleteManageDept(string);
      
      
      
    
DeleteManageDeptRespDto retData = new DeleteManageDeptRespDto();
  
  

  
  
return retData;
  }
/**
   * D1-2批量查询权限分配by分配对象(公共)[4575]
   * gen by moon at 10/2/2022, 6:59:19 AM
   */
  @Trace(operationName = "D1-2批量查询权限分配by分配对象(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public BatchQueryTributPowerComByObjRespDto batchQueryTributPowerComByObj(BatchQueryTributPowerComByObjReqDto reqDto){
    
      
      List<PrivacyDistribution> listPrivacyDistribution_1 =new ArrayList<>();
//步骤0: 1-2-12批量查询权限分配by分配对象 - batchQueryTributPower
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    BatchQueryTributPowerReq batchQueryTributPowerReq=new BatchQueryTributPowerReq();
  batchQueryTributPowerReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:332255_1
if(reqDto!=null){
      //list-field-assign
    batchQueryTributPowerReq.setTributPowerList(reqDto.getTributPowerList());//sourceId:332256_1
batchQueryTributPowerReq.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:332247_1
batchQueryTributPowerReq.setIsportPrivacy(reqDto.getIsportPrivacy());//SimpleFieldAssign//sourceId:332248_1
batchQueryTributPowerReq.setPrivacyRoute(reqDto.getPrivacyRoute());//SimpleFieldAssign//sourceId:332249_1
batchQueryTributPowerReq.setIsDataPrivacy(reqDto.getIsDataPrivacy());//SimpleFieldAssign//sourceId:332250_1
batchQueryTributPowerReq.setDataModel(reqDto.getDataModel());//SimpleFieldAssign//sourceId:332251_1
batchQueryTributPowerReq.setPrivacyCategory(reqDto.getPrivacyCategory());//SimpleFieldAssign//sourceId:332252_1
batchQueryTributPowerReq.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:332253_1
batchQueryTributPowerReq.setTypeCode(reqDto.getTypeCode());//SimpleFieldAssign//sourceId:332254_1
    }
  
    /*1-2-12批量查询权限分配by分配对象[4574]   */
    Assert.isNull(batchQueryTributPowerReq.getSubjectLifeCycle(),"D1-2批量查询权限分配by分配对象(公共)-1-2-12批量查询权限分配by分配对象-主体生命周期不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.batchQueryTributPower(batchQueryTributPowerReq);
      
      
      listPrivacyDistribution_1 = listPrivacyDistribution;
    
BatchQueryTributPowerComByObjRespDto retData = new BatchQueryTributPowerComByObjRespDto();
  retData.setTributPowerList(listPrivacyDistribution_1.stream().map(item -> BeanUtil.toBean(item, TributPowerDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:332259_1
  

  
  
return retData;
  }
/**
   * D1-2查询部门管理权限详情[1806]
   * gen by moon at 10/2/2022, 12:55:26 AM
   */
  @Trace(operationName = "D1-2查询部门管理权限详情")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryDeptPowerDetailRespDto queryDeptPowerDetail(QueryDeptPowerDetailReqDto reqDto){
    
      
      Dept dept_1 =null;
//步骤0: 1-2-14查询管理的部门详情 - queryManageDeptDetail
     ManagedDept managedDept = null;
    QueryManageDeptDetailReq queryManageDeptDetailReq=new QueryManageDeptDetailReq();
  queryManageDeptDetailReq.setDeptId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecDeptId());//CURRENT_DEPTID//sourceId:55241_1
queryManageDeptDetailReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:55256_1
  
    /*1-2-14查询管理的部门详情[1087]   */
    Assert.isNull(queryManageDeptDetailReq.getDeptId(),"D1-2查询部门管理权限详情-1-2-14查询管理的部门详情-部门ID不能为空",false);
Assert.isNull(queryManageDeptDetailReq.getOriginalRoleMemberId(),"D1-2查询部门管理权限详情-1-2-14查询管理的部门详情-身份人员ID不能为空",false);
      managedDept = mManagedDeptService.queryManageDeptDetail(queryManageDeptDetailReq);
      
      
      
    
//步骤1: 1-3-09查询部门详情 - queryDeptDetail
     Dept dept = null;
    if(managedDept !=null){
          QueryDeptDetailReq queryDeptDetailReq=new QueryDeptDetailReq();
  queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:55495_1
if(managedDept!=null){
      queryDeptDetailReq.setDeptId(managedDept.getDeptId());//SimpleFieldAssign//sourceId:55473_1
    }
  
    /*1-3-09查询部门详情[218]   */
    Assert.isNull(queryDeptDetailReq.getDeptId(),"D1-2查询部门管理权限详情-1-3-09查询部门详情-部门ID不能为空",false);
Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(),"D1-2查询部门管理权限详情-1-3-09查询部门详情-主体生命周期不能为空",false);
      dept = mDeptService.queryDeptDetail(queryDeptDetailReq);
      
      
      dept_1 = dept;
           }
    
QueryDeptPowerDetailRespDto retData = new QueryDeptPowerDetailRespDto();
  if(dept_1!=null){
      retData.setDeptId(dept_1.getDeptId());//SimpleFieldAssign//sourceId:55505_1
retData.setDeptCode(dept_1.getDeptCode());//SimpleFieldAssign//sourceId:55506_1
retData.setDeptName(dept_1.getDeptName());//SimpleFieldAssign//sourceId:55507_1
retData.setDeptEnName(dept_1.getDeptEnName());//SimpleFieldAssign//sourceId:55508_1
retData.setDeptShortName(dept_1.getDeptShortName());//SimpleFieldAssign//sourceId:55509_1
    }
  

  
  
return retData;
  }
/**
   * D1查询一级部门下分配权限人员列表(管理)[5136]
   * gen by moon at 11/6/2022, 3:37:25 AM
   */
  @Trace(operationName = "D1查询一级部门下分配权限人员列表(管理)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryOneDeptTributPowerStaffListRespDto queryOneDeptTributPowerStaffList(QueryOneDeptTributPowerStaffListReqDto reqDto){


      List<InductionRecord> listInductionRecord_3 =new ArrayList<>();
List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo_1 =new ArrayList<>();
List<Userinfo> listUserinfo_1 =new ArrayList<>();
//步骤0: 1-3-09查询部门列表 - queryDeptList
     List<Dept> listDept =new ArrayList<>();
    QueryDeptListReq queryDeptListReq=new QueryDeptListReq();
  queryDeptListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:422747_1
if(reqDto!=null){
      queryDeptListReq.setDeptCode(reqDto.getDeptCode());//SimpleFieldAssign//sourceId:422752_1
    }

    /*1-3-09查询当前部门下所有子部门列表（包含当前部门）[217]   */
    Assert.isNull(queryDeptListReq.getDeptCode(),"D1查询一级部门下分配权限人员列表(管理)-1-3-09查询当前部门下所有子部门列表（包含当前部门）-部门标识不能为空",false);
Assert.isNull(queryDeptListReq.getSubjectLifeCycle(),"D1查询一级部门下分配权限人员列表(管理)-1-3-09查询当前部门下所有子部门列表（包含当前部门）-主体生命周期不能为空",false);
      listDept = mDeptService.queryDeptList(queryDeptListReq);
      Assert.isTrue(listDept== null|| CollectionUtil.isEmpty(listDept)||  listDept ==null|| CollectionUtil.isEmpty(listDept)|| listDept.size()==0 ,"返回值不能为空",false);



//步骤1: 1-3-13批量查询就职记录by部门ID - batchQueryInductionRecordByDeptId
     List<InductionRecord> listInductionRecord =new ArrayList<>();
    if(listDept !=null&& !CollectionUtil.isEmpty(listDept)&& listDept.size()>0 ){
          BatchQueryInductionRecordByDeptIdReq batchQueryInductionRecordByDeptIdReq=new BatchQueryInductionRecordByDeptIdReq();
  batchQueryInductionRecordByDeptIdReq.setInductionRecordByDeptIdList(listDept.stream().map(item->item.getDeptId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:422761_1
batchQueryInductionRecordByDeptIdReq.setInductionUnitTypeCode("DEPT");//sourceId:422763_1
batchQueryInductionRecordByDeptIdReq.setIsTransaction("FALSE");//sourceId:422764_1
batchQueryInductionRecordByDeptIdReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:422765_1

    /*1-3-13批量查询就职记录by部门ID[5139]   */
    Assert.isNull(batchQueryInductionRecordByDeptIdReq.getInductionUnitTypeCode(),"D1查询一级部门下分配权限人员列表(管理)-1-3-13批量查询就职记录by部门ID-就职单位类型实例不能为空",false);
Assert.isNull(batchQueryInductionRecordByDeptIdReq.getIsTransaction(),"D1查询一级部门下分配权限人员列表(管理)-1-3-13批量查询就职记录by部门ID-是否异动不能为空",false);
Assert.isNull(batchQueryInductionRecordByDeptIdReq.getSubjectLifeCycle(),"D1查询一级部门下分配权限人员列表(管理)-1-3-13批量查询就职记录by部门ID-主体生命周期不能为空",false);
      listInductionRecord = mInductionRecordService.batchQueryInductionRecordByDeptId(batchQueryInductionRecordByDeptIdReq);



           }

//步骤2: 1-2-12批量查询权限分配列表 - batchQueryTributPowerList
     List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    if(listInductionRecord !=null&& !CollectionUtil.isEmpty(listInductionRecord)&& listInductionRecord.size()>0 ){
          BatchQueryTributPowerListReq batchQueryTributPowerListReq=new BatchQueryTributPowerListReq();
  batchQueryTributPowerListReq.setTributPowerList(listInductionRecord.stream().map(item->item.getInductionRecordId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:422696_1
batchQueryTributPowerListReq.setTypeCode("PERSONAL_DEPARTMENT");//sourceId:422695_1
batchQueryTributPowerListReq.setIsArchive("FALSE");//sourceId:422706_1
batchQueryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:422704_1

    /*1-2-12批量查询上文就职记录的权限分配列表[702]   */
    Assert.isNull(batchQueryTributPowerListReq.getTypeCode(),"D1查询一级部门下分配权限人员列表(管理)-1-2-12批量查询上文就职记录的权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(batchQueryTributPowerListReq.getIsArchive(),"D1查询一级部门下分配权限人员列表(管理)-1-2-12批量查询上文就职记录的权限分配列表-是否存档不能为空",false);
Assert.isNull(batchQueryTributPowerListReq.getSpaceId(),"D1查询一级部门下分配权限人员列表(管理)-1-2-12批量查询上文就职记录的权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.batchQueryTributPowerList(batchQueryTributPowerListReq);



           }

//步骤3: D2执行数据集记录去重(公共) - implementDataSetDuplicateRemovalCom
     ImplementDataSetDuplicateRemovalComRespDto implementDataSetDuplicateRemovalComRespDto = null;
    if(listPrivacyDistribution !=null&& !CollectionUtil.isEmpty(listPrivacyDistribution)&& listPrivacyDistribution.size()>0 ){
          ImplementDataSetDuplicateRemovalComReqDto implementDataSetDuplicateRemovalComReqDto=new ImplementDataSetDuplicateRemovalComReqDto();
  implementDataSetDuplicateRemovalComReqDto.setDataSetDuplicateRemovalList(listPrivacyDistribution.stream().map(item->item.getAllocationObjectId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:422732_1

    /*D2执行数据集记录去重(公共)[5138]   */

      implementDataSetDuplicateRemovalComRespDto = fwCompInterfaceModeClient.implementDataSetDuplicateRemovalCom(implementDataSetDuplicateRemovalComReqDto).getData();



           }

//步骤4: 1-3-13批量查询就职记录列表 - batchQueryInductionRecordList
     List<InductionRecord> listInductionRecord_2 =new ArrayList<>();
    if(implementDataSetDuplicateRemovalComRespDto !=null){
          BatchQueryInductionRecordListReq batchQueryInductionRecordListReq=new BatchQueryInductionRecordListReq();
  batchQueryInductionRecordListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:422715_1
if(implementDataSetDuplicateRemovalComRespDto!=null){
      batchQueryInductionRecordListReq.setPerOrgInductionRecordList(implementDataSetDuplicateRemovalComRespDto.getDataSetDuplicateRemovalList());//list-field-assign//sourceId:422709_1
    }

    /*1-3-13批量查询过滤就职记录列表[601]   */
    Assert.isNull(batchQueryInductionRecordListReq.getSpaceId(),"D1查询一级部门下分配权限人员列表(管理)-1-3-13批量查询过滤就职记录列表-创建于空间ID不能为空",false);
      listInductionRecord_2 = mInductionRecordService.batchQueryInductionRecordList(batchQueryInductionRecordListReq);


      listInductionRecord_3 = listInductionRecord_2;
           }

//步骤5: 1-2-10批量查询身份人员资料列表 - batchQueryBeginMembInfoList
     List<OriginalRoleMemberInfo> listOriginalRoleMemberInfo =new ArrayList<>();
    if(listInductionRecord_2 !=null&& !CollectionUtil.isEmpty(listInductionRecord_2)&& listInductionRecord_2.size()>0 ){
          BatchQueryBeginMembInfoListReq batchQueryBeginMembInfoListReq=new BatchQueryBeginMembInfoListReq();
  batchQueryBeginMembInfoListReq.setBeginMembInfoList(listInductionRecord_2.stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:422720_1

    /*1-2-10批量查询身份人员资料列表[1014]   */

      listOriginalRoleMemberInfo = mOriginalRoleMemberInfoService.batchQueryBeginMembInfoList(batchQueryBeginMembInfoListReq);


      listOriginalRoleMemberInfo_1 = listOriginalRoleMemberInfo;
           }

//步骤6: 1-2-02批量查询个人资料列表 - batchQueryUserinfoList
     List<Userinfo> listUserinfo =new ArrayList<>();
    if(listInductionRecord_2 !=null&& !CollectionUtil.isEmpty(listInductionRecord_2)&& listInductionRecord_2.size()>0 ){
          BatchQueryUserinfoListReq batchQueryUserinfoListReq=new BatchQueryUserinfoListReq();
  batchQueryUserinfoListReq.setUserList(listInductionRecord_2.stream().map(item->item.getUserId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:422723_1

    /*1-2-02批量查询个人资料列表[52]   */

      listUserinfo = mUserinfoService.batchQueryUserinfoList(batchQueryUserinfoListReq);


      listUserinfo_1 = listUserinfo;
           }

QueryOneDeptTributPowerStaffListRespDto retData = new QueryOneDeptTributPowerStaffListRespDto();
  //数据集融合  MoreListToOneSource
        if(listInductionRecord_3!= null&& !CollectionUtil.isEmpty(listInductionRecord_3) && !CollectionUtil.isEmpty(listInductionRecord_3) ){
          for (InductionRecord inductionRecord : listInductionRecord_3) {
              OneDeptTributPowerStaffDto retElm = new OneDeptTributPowerStaffDto();
             retElm.setInductionRecordId(inductionRecord.getInductionRecordId());//SimpleFieldAssign//sourceId:115767_2
retElm.setUserId(inductionRecord.getUserId());//SimpleFieldAssign//sourceId:115769_2
retElm.setOriginalRoleMemberId(inductionRecord.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:115768_2
retElm.setDeptShortName(inductionRecord.getDeptShortName());//SimpleFieldAssign//sourceId:115770_2
              retData.getOneDeptTributPowerStaffList().add(retElm);
               if(listUserinfo_1!= null&& !CollectionUtil.isEmpty(listUserinfo_1)){
          for (Userinfo userinfo : listUserinfo_1) {
                if (userinfo.getUserId().equals(inductionRecord.getUserId())) {
                 retElm.setUserFace(userinfo.getUserFace());//SimpleFieldAssign//sourceId:115775_2
retElm.setIdCardName(userinfo.getIdCardName());//SimpleFieldAssign//sourceId:115773_2
retElm.setNickName(userinfo.getNickName());//SimpleFieldAssign//sourceId:115774_2
                }
            }
          }

 if(listOriginalRoleMemberInfo_1!= null&& !CollectionUtil.isEmpty(listOriginalRoleMemberInfo_1)){
          for (OriginalRoleMemberInfo originalRoleMemberInfo : listOriginalRoleMemberInfo_1) {
                if (originalRoleMemberInfo.getOriginalRoleMemberId().equals(inductionRecord.getOriginalRoleMemberId())) {
                 retElm.setRoleMemberCode(originalRoleMemberInfo.getRoleMemberCode());//SimpleFieldAssign//sourceId:115771_2
retElm.setPositionIdName(originalRoleMemberInfo.getPositionIdName());//SimpleFieldAssign//sourceId:115772_2
                }
            }
          }

          }
        }//sourceId:422803_1




return retData;
  }
/**
   * D1-3查询当前员工角色权限列表[3091]
   * gen by moon at 5/21/2024, 10:25:17 AM
   */
  @Trace(operationName = "D1-3查询当前员工角色权限列表")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryCurrentStaffRolePowerListRespDto queryCurrentStaffRolePowerList(QueryCurrentStaffRolePowerListReqDto reqDto){


      List<PrivacyDistribution> listPrivacyDistribution_1 =new ArrayList<>();
//virtualUsage 1-2-08查询用于权限角色列表  27364
      List<RoleMember> listRoleMember =new ArrayList<>();
    QueryRoleOfPowerListReq queryRoleOfPowerListReq=new QueryRoleOfPowerListReq();
  queryRoleOfPowerListReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:104731_1_27364

    /*1-2-08查询用于权限角色列表[2184]   */
    Assert.isNull(queryRoleOfPowerListReq.getOriginalRoleMemberId(),"D1-3查询当前员工角色权限列表-1-2-08查询用于权限角色列表-身份人员ID不能为空",false);
      listRoleMember = mRoleMemberService.queryRoleOfPowerList(queryRoleOfPowerListReq)/*vcase invoke 本地 method 方法调用;*/;



if((listRoleMember!= null&&  listRoleMember !=null && listRoleMember.size()>0&&listRoleMember!= null&&  listRoleMember !=null && listRoleMember.size()>0)) {
        //if(1-2-08查询用于权限角色列表.角色人员列表数据集条数 大于 0)  27365

List<PrivacyDistribution> listPrivacyDistribution =new ArrayList<>();
    if(listRoleMember !=null&& !CollectionUtil.isEmpty(listRoleMember)&& listRoleMember.size()>0 ){
          BatchQueryTributPowerListReq batchQueryTributPowerListReq=new BatchQueryTributPowerListReq();
batchQueryTributPowerListReq.setTypeCode("ROLE");//sourceId:104733_1_27366
batchQueryTributPowerListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:104736_1_27366
batchQueryTributPowerListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:612644_1_27366
if(listRoleMember!= null&& !CollectionUtil.isEmpty(listRoleMember)&&  listRoleMember !=null&& !CollectionUtil.isEmpty(listRoleMember)){
      batchQueryTributPowerListReq.setTributPowerList(listRoleMember.stream().map(item->item.getRoleId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:104734_1_27366
    }
if(reqDto!=null){
      batchQueryTributPowerListReq.setIsDataPrivacy(reqDto.getIsDataPrivacy());//SimpleFieldAssign//sourceId:104738_1_27366
batchQueryTributPowerListReq.setPrivacyCategory(reqDto.getPrivacyCategory());//SimpleFieldAssign//sourceId:104739_1_27366
batchQueryTributPowerListReq.setDataModel(reqDto.getDataModel());//SimpleFieldAssign//sourceId:104740_1_27366
batchQueryTributPowerListReq.setBusinessPurposes(reqDto.getBusinessPurposes());//SimpleFieldAssign//sourceId:105410_1_27366
    }

    /*1-2-12批量查询权限分配列表[702]   */
    Assert.isNull(batchQueryTributPowerListReq.getTypeCode(),"D1-3查询当前员工角色权限列表-1-2-12批量查询权限分配列表-分配对象类型编码不能为空",false);
Assert.isNull(batchQueryTributPowerListReq.getSubjectLifeCycle(),"D1-3查询当前员工角色权限列表-1-2-12批量查询权限分配列表-主体生命周期不能为空",false);
Assert.isNull(batchQueryTributPowerListReq.getSpaceId(),"D1-3查询当前员工角色权限列表-1-2-12批量查询权限分配列表-创建于空间ID不能为空",false);
      listPrivacyDistribution = mPrivacyDistributionService.batchQueryTributPowerList(batchQueryTributPowerListReq)/*vcase invoke 本地 method 方法调用;*/;


      listPrivacyDistribution_1 = listPrivacyDistribution;
           }
      }
QueryCurrentStaffRolePowerListRespDto retData = new QueryCurrentStaffRolePowerListRespDto();
  retData.setTributPowerList(listPrivacyDistribution_1.stream().map(item -> BeanUtil.toBean(item, TributPowerDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:304412_1




return retData;
  }
/**
   * D1查询当前用户权限列表(公共)[10203]
   * gen by moon at 10/7/2024, 9:43:40 PM
   */
  @Trace(operationName = "D1查询当前用户权限列表(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public QueryCurrentUserPowerListComRespDto queryCurrentUserPowerListCom(QueryCurrentUserPowerListComReqDto reqDto){


      QueryReceiveFieldDetailRespDto receptionServiceRes_2 =null;
//步骤0: M1-获取接收字段（特殊方法） - queryReceiveFieldDetail
     //ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes = null;
    QueryReceiveFieldDetailReqDto receptionServiceReq=new QueryReceiveFieldDetailReqDto();


    /*M1-获取接收字段（特殊方法）[3715]  用于特殊方法接收上游入参。 */

      receptionServiceRes = nbPower.queryReceiveFieldDetail(receptionServiceReq);




//步骤1: D1查询当前员工角色权限列表(公共) - queryCurrentStaffRolePowerListCom
     QueryCurrentStaffRolePowerListComRespDto queryCurrentStaffRolePowerListComRespDto = null;
    QueryCurrentStaffRolePowerListComReqDto queryCurrentStaffRolePowerListComReqDto=new QueryCurrentStaffRolePowerListComReqDto();
  queryCurrentStaffRolePowerListComReqDto.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:1992744_1

    /*D1查询当前员工角色权限列表(公共)[3091]   */
    Assert.isNull(queryCurrentStaffRolePowerListComReqDto.getOriginalRoleMemberId(),"D1查询当前用户权限列表(公共)-D1查询当前员工角色权限列表(公共)-身份人员ID不能为空",false);
      queryCurrentStaffRolePowerListComRespDto = queryCurrentStaffRolePowerListCom(queryCurrentStaffRolePowerListComReqDto)/*vcase invoke 同服务,同domain*/;




//步骤2: D1-2查询当前用户就职记录权限列表(公共) - queryCurrentUserRecordTributPowerListCom
     QueryCurrentUserRecordTributPowerListComRespDto queryCurrentUserRecordTributPowerListComRespDto = null;
    QueryCurrentUserRecordTributPowerListComReqDto queryCurrentUserRecordTributPowerListComReqDto=new QueryCurrentUserRecordTributPowerListComReqDto();
  queryCurrentUserRecordTributPowerListComReqDto.setAllocationObjectId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:1992736_1
queryCurrentUserRecordTributPowerListComReqDto.setTypeCode("PERSONAL_DEPARTMENT");//sourceId:1992741_1
queryCurrentUserRecordTributPowerListComReqDto.setBusinessPurposes("ALL");//sourceId:2015379_1

    /*D1-2查询当前用户就职记录部门个人权限列表(公共)[4548]   */
    Assert.isNull(queryCurrentUserRecordTributPowerListComReqDto.getAllocationObjectId(),"D1查询当前用户权限列表(公共)-D1-2查询当前用户就职记录部门个人权限列表(公共)-分配对象ID不能为空",false);
Assert.isNull(queryCurrentUserRecordTributPowerListComReqDto.getTypeCode(),"D1查询当前用户权限列表(公共)-D1-2查询当前用户就职记录部门个人权限列表(公共)-分配对象类型编码不能为空",false);
Assert.isNull(queryCurrentUserRecordTributPowerListComReqDto.getBusinessPurposes(),"D1查询当前用户权限列表(公共)-D1-2查询当前用户就职记录部门个人权限列表(公共)-权限业务用途不能为空",false);
      queryCurrentUserRecordTributPowerListComRespDto = queryCurrentUserRecordTributPowerListCom(queryCurrentUserRecordTributPowerListComReqDto)/*vcase invoke 同服务,同domain*/;




//步骤3: D2执行多数据集取并集(公共) - implementUnionMultipleDataSetsCom
     ImplementUnionMultipleDataSetsComRespDto implementUnionMultipleDataSetsComRespDto = null;
    ImplementUnionMultipleDataSetsComReqDto implementUnionMultipleDataSetsComReqDto=new ImplementUnionMultipleDataSetsComReqDto();
  if(queryCurrentStaffRolePowerListComRespDto!= null&&  queryCurrentStaffRolePowerListComRespDto.getTributPowerList() !=null&& !CollectionUtil.isEmpty(queryCurrentStaffRolePowerListComRespDto.getTributPowerList())){
      implementUnionMultipleDataSetsComReqDto.setDataSetsListOne(//objList-to-objLists
        queryCurrentStaffRolePowerListComRespDto.getTributPowerList().stream().map(item -> {
      DataSetsListOneDto elm = new DataSetsListOneDto();
      if(item!=null){
      elm.setCustomField(item.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:414633_2
elm.setCustomField1(item.getPrivacyCode());//SimpleFieldAssign//sourceId:414632_2
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1992746_1
    }
if(queryCurrentUserRecordTributPowerListComRespDto!= null&&  queryCurrentUserRecordTributPowerListComRespDto.getCurrentUserRecordTributPowerList() !=null&& !CollectionUtil.isEmpty(queryCurrentUserRecordTributPowerListComRespDto.getCurrentUserRecordTributPowerList())){
      implementUnionMultipleDataSetsComReqDto.setDataSetsListTwo(//objList-to-objLists
        queryCurrentUserRecordTributPowerListComRespDto.getCurrentUserRecordTributPowerList().stream().map(item -> {
      DataSetsListTwoDto elm = new DataSetsListTwoDto();
      if(item!=null){
      elm.setCustomField(item.getPrivacyDistributionId());//SimpleFieldAssign//sourceId:414638_2
elm.setCustomField1(item.getPrivacyCode());//SimpleFieldAssign//sourceId:414639_2
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1992747_1
    }

    /*D2执行多数据集取并集(公共)[5320]   */

      implementUnionMultipleDataSetsComRespDto = fwCompInterfaceModeClient.implementUnionMultipleDataSetsCom(implementUnionMultipleDataSetsComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;




//步骤4: M1-获取接收字段（特殊方法） - queryReceiveFieldDetail
     //ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
    if(implementUnionMultipleDataSetsComRespDto !=null){
          QueryReceiveFieldDetailReqDto receptionServiceReq_1=new QueryReceiveFieldDetailReqDto();
  if(implementUnionMultipleDataSetsComRespDto!= null&&  implementUnionMultipleDataSetsComRespDto.getUnionMultipleDataSetsList() !=null&& !CollectionUtil.isEmpty(implementUnionMultipleDataSetsComRespDto.getUnionMultipleDataSetsList())){
      receptionServiceReq_1.setPowerCodeList(//objList-to-objLists
        implementUnionMultipleDataSetsComRespDto.getUnionMultipleDataSetsList().stream().map(item -> {
      PowerCodeListDto elm = new PowerCodeListDto();
      if(item!=null){
      elm.setPrivacyDistributionId(item.getCustomField());//SimpleFieldAssign//sourceId:414713_2
elm.setPrivacyCode(item.getCustomField1());//SimpleFieldAssign//sourceId:414714_2
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1993007_1
    }

    /*M1-接收出参：权限分配列表[3715]  用于特殊方法接收上游入参。 */

      receptionServiceRes_1 = nbPower.queryReceiveFieldDetail(receptionServiceReq_1);


      receptionServiceRes_2 = receptionServiceRes_1;
           }

QueryCurrentUserPowerListComRespDto retData = new QueryCurrentUserPowerListComRespDto();
  if(receptionServiceRes_2!=null){
      retData.setPowerCodeList(receptionServiceRes_2.getPowerCodeList().stream().map(item -> BeanUtil.toBean(item, PowerCodeListDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1993009_1
    }




return retData;
  }
    //
}
